Skip to content

Conversation

@jamillambert
Copy link
Contributor

@jamillambert jamillambert commented Sep 19, 2025

All the benchmarking for this repo is being moved to use criterion.

  • Add a README.md for the crate.
  • Move all of the existing hashes benchmarks to benches
  • Move all of the existing chacha20_poly1305 benchmarks to benches

@github-actions github-actions bot added C-bitcoin PRs modifying the bitcoin crate C-hashes PRs modifying the hashes crate doc C-chacha20_poly1305 labels Sep 19, 2025
Run all benchmarks in this crate:

```bash
cargo bench
Copy link
Contributor

Choose a reason for hiding this comment

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

If I remember, this requires the nightly toolchain which would be worth a mention. Or you could do cargo +nightly bench here I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a section stating that the MSRV is 1.81 due to the dependency on criterion. I did try to get it to work on 1.74.0, but didn't manage in a reasonable amount of time and assumed it wasn't important since the benches only ran on nightly before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops, it's libfuzzer that requires nightly, not criterion. Sorry, I redact the previous comment.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, as long as something's in the top-level workspace.exclude we can require pretty-much anything.

I do think it's possible to get an old version of criterion that works with 1.74, but agree that it's not particularly urgent.

Add a readme file to describe how to use the new benches crate.
Move all of the bench code to individual files in hashes/benches/

Add Criterion as a dependency in Cargo.toml
Move all of the bench code to individual files in
chacha20_poly1305/benches/

Add Criterion as a dependency in Cargo.toml
@jamillambert jamillambert force-pushed the 0919-criterion-hashes-chacha branch from 96dfc80 to aeb6027 Compare September 19, 2025 18:48
@github-actions github-actions bot removed the C-bitcoin PRs modifying the bitcoin crate label Sep 19, 2025
@jamillambert jamillambert marked this pull request as ready for review September 19, 2025 18:52
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK aeb6027; successfully ran local tests

@apoelstra apoelstra merged commit 78c64a6 into rust-bitcoin:master Sep 21, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-hashes PRs modifying the hashes crate doc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants