Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR closes #205
It changes the following:
Adds criterion benchmarks in
benches/, split into three files so you can run one area at a time.hashescovers SHA-256, SHA-512 and SHA3-256 on 64 byte and 1 KiB inputs.symmetriccovers AES-128 block encrypt and decrypt, AES-128 CBC on 1 KiB, and ChaCha20 on 1 KiB.algebracovers prime and extension field mul and inverse, curve add and scalar mul, the Tate pairing on the points from the pairing tests, and polynomial mul, DFT, FFT and evaluation. The README has a short section on running them.I went with criterion only and no nightly
#[bench]for now, it works on the pinned toolchain and gives the same output for inner methods and end-to-end runs. Default features are off so it doesn't pull in rayon or plotters. The newest clap needs edition 2024, which the 2024-06 nightly cargo can't parse, so the lockfile pins clap 4.5.20. Nothing else in the lockfile changed apart from the new crates.They already show a couple of things worth a look, e.g. a prime field inverse takes about 2 µs while an extension field inverse takes about 50 ns, and an AES block takes about 60 µs.