Skip to content

Conversation

@kevaundray
Copy link
Contributor

No description provided.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 18, 2025

CodSpeed Performance Report

Merging #2735 will not alter performance

Comparing kevaundray:kw/blake2-benchmarks (9e65303) with main (a494e38)

Summary

✅ 160 untouched benchmarks
🆕 10 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 blake2/100K_rounds N/A 9.2 ms N/A
🆕 blake2/1024_rounds N/A 97.6 µs N/A
🆕 blake2/10_rounds N/A 4.4 µs N/A
🆕 blake2/12_rounds N/A 4.6 µs N/A
🆕 blake2/200K_rounds N/A 18.4 ms N/A
🆕 blake2/2_rounds N/A 3.1 µs N/A
🆕 blake2/4_rounds N/A 3.5 µs N/A
🆕 blake2/512_rounds N/A 50.5 µs N/A
🆕 blake2/64_rounds N/A 9.3 µs N/A
🆕 blake2/compress_12_rounds N/A 3.1 µs N/A

Comment on lines +91 to +111
// Benchmark just the compression function with different round counts
group.bench_function("blake2/compress_12_rounds", |b| {
let h = [
0x6a09e667f3bcc908u64,
0xbb67ae8584caa73bu64,
0x3c6ef372fe94f82bu64,
0xa54ff53a5f1d36f1u64,
0x510e527fade682d1u64,
0x9b05688c2b3e6c1fu64,
0x1f83d9abfb41bd6bu64,
0x5be0cd19137e2179u64,
];
let m = [0u8; 128];
let t = [0u64, 0u64];
b.iter(|| {
let mut h_copy = h;
blake2::algo::compress(
black_box(12),
&mut h_copy,
black_box(&m),
black_box(t),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove -- so we are only benchmarking the precompile in the way that it will be called

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was a reason for measuring 12 rounds. Is it to compare with other blake implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was mainly because blake2b uses 12 rounds

@kevaundray kevaundray marked this pull request as ready for review July 21, 2025 09:50
@rakita rakita merged commit f4f4c38 into bluealloy:main Jul 21, 2025
29 checks passed
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