Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@naoNao89
Copy link
Contributor

cksum lacks performance benchmarks while other utilities have them.

- Add comprehensive benchmarks for all 17 SUPPORTED_ALGORITHMS
- Include custom SHAKE algorithm benchmarks using direct digest calculation
- Add CI integration with benchmark workflow
- No core cksum logic modifications to avoid merge conflicts
- Split bench_shake_algorithm macro into separate patterns for Shake128 and Shake256
- Only import the specific SHAKE type that is used in each macro invocation
- Resolves CI compilation errors due to unused import warnings
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 29, 2025

CodSpeed Performance Report

Merging #9075 will degrade performances by 3.02%

Comparing naoNao89:bench/cksum-simple (1350324) with main (ca6d69a)

Summary

❌ 2 regressions
✅ 102 untouched
🆕 20 new
🗄️ 1 archived benchmark run1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 cksum_blake2b N/A 190.5 ms N/A
🆕 cksum_blake3 N/A 95.8 ms N/A
🆕 cksum_bsd N/A 128.2 ms N/A
🆕 cksum_crc N/A 42.5 ms N/A
🆕 cksum_crc32b N/A 15.9 ms N/A
🆕 cksum_default N/A 42.4 ms N/A
🆕 cksum_md5 N/A 317.9 ms N/A
🆕 cksum_multiple_files N/A 63.6 ms N/A
🆕 cksum_raw_output N/A 42.4 ms N/A
🆕 cksum_sha1 N/A 723 ms N/A
🆕 cksum_sha2 N/A 1.7 s N/A
🆕 cksum_sha224 N/A 1.7 s N/A
🆕 cksum_sha256 N/A 1.7 s N/A
🆕 cksum_sha3 N/A 1.8 s N/A
🆕 cksum_sha384 N/A 1.1 s N/A
🆕 cksum_sha512 N/A 1.1 s N/A
🆕 cksum_shake128 N/A 1.5 s N/A
🆕 cksum_shake256 N/A 1.9 s N/A
🆕 cksum_sm3 N/A 1.6 s N/A
🆕 cksum_sysv N/A 48.1 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Footnotes

  1. 1 benchmark was run, but is now archived. If it was deleted in another branch, consider rebasing to remove it from the report. Instead if it was added back, click here to restore it.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@naoNao89 naoNao89 force-pushed the bench/cksum-simple branch 4 times, most recently from 3d0d291 to f0c220d Compare October 29, 2025 11:36
- Use length as parameter instead of hardcoded values
- Add algorithm-specific lengths for each algorithm (224, 256, 384, 512 bits)
- Resolves benchmarks running too fast (<500µs) due to invalid length parameters
- All algorithms now produce meaningful hash outputs with proper timing
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cksum/cksum-c is no longer failing!
Congrats! The gnu test tests/cksum/cksum-sha3 is no longer failing!

@RenjiSann
Copy link
Collaborator

Almost good, the cksum_sha(224|256|384|512) are failing because they shouldn't provide a --length argument (length is implicit in their name)

SHA224, SHA256, SHA384, and SHA512 algorithms don't support the --length
parameter since the length is implicit in their algorithm names. Only the
generic sha2 and sha3 algorithms require explicit length specification.
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cksum/cksum-c is no longer failing!
Congrats! The gnu test tests/cksum/cksum-sha3 is no longer failing!

@RenjiSann RenjiSann merged commit 8b7286a into uutils:main Oct 30, 2025
122 of 124 checks passed
@RenjiSann
Copy link
Collaborator

Thanks you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants