bench(jolt-sumcheck): add criterion benchmarks for verifier paths#1520
Open
wstran wants to merge 1 commit into
Open
bench(jolt-sumcheck): add criterion benchmarks for verifier paths#1520wstran wants to merge 1 commit into
wstran wants to merge 1 commit into
Conversation
`jolt-sumcheck` was the only modular crate with fuzz coverage but no
benchmarks. This adds a `benches/sumcheck_verifier.rs` covering both
verifier entry points and wires the crate into the existing
`bench-crates.yml` matrix so future regressions are caught on PR via
critcmp diffing against the `main` baseline.
## Benches
- `SumcheckVerifier::verify/{8,14,18,22}` — single-instance honest-proof
verification across realistic round counts.
- `BatchedSumcheckVerifier::verify/same_size/{n_vars=14,18}/{n_claims=2,4}`
— front-loaded RLC batching path.
Each bench builds an honest proof with a minimal in-bench reference prover
(mirroring the unit-test helper) so the verifier exercises the full
Fiat-Shamir loop end-to-end, not just round-0 rejection.
## Local numbers (apple-darwin M1, 10 samples, 3s measurement)
```
SumcheckVerifier::verify/8 3.32 µs
SumcheckVerifier::verify/14 5.68 µs
SumcheckVerifier::verify/18 7.32 µs
SumcheckVerifier::verify/22 8.89 µs
BatchedSumcheckVerifier::verify/same_size/n_vars=14/n_claims=2 6.10 µs
BatchedSumcheckVerifier::verify/same_size/n_vars=14/n_claims=4 6.39 µs
BatchedSumcheckVerifier::verify/same_size/n_vars=18/n_claims=2 7.73 µs
BatchedSumcheckVerifier::verify/same_size/n_vars=18/n_claims=4 7.99 µs
```
## CI
Adds `jolt-sumcheck` to both the baseline and PR runs in
`.github/workflows/bench-crates.yml`, alongside the four crates that
already publish criterion baselines (`jolt-crypto`, `jolt-field`,
`jolt-poly`, `jolt-transcript`).
## Validation
- `cargo build -p jolt-sumcheck --benches` — clean
- `cargo nextest run -p jolt-sumcheck` — 42/42 pass
- `cargo nextest run -p jolt-core muldiv --features host` — pass
- `cargo nextest run -p jolt-core muldiv --features host,zk` — pass
- `cargo clippy -p jolt-sumcheck --all-targets -- -D warnings` — clean
- `cargo clippy -p jolt-core --features host --all-targets -- -D warnings` — clean
- `cargo clippy -p jolt-core --features host,zk --all-targets -- -D warnings` — clean
- `cargo fmt -q` — clean
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.
Summary
jolt-sumcheckis the only modular crate with fuzz coverage but nocriterion benchmarks (the four crates already in
bench-crates.yml—jolt-crypto,jolt-field,jolt-poly,jolt-transcript— all publish baselines). This PR adds abenches/sumcheck_verifier.rscovering both verifier entry points andwires the crate into the existing matrix so future regressions show up
on PR via the critcmp diff against the
mainbaseline.Benches
SumcheckVerifier::verify/{8,14,18,22}— single-instance honest-proofverification across realistic round counts.
BatchedSumcheckVerifier::verify/same_size/{n_vars=14,18}/{n_claims=2,4}— front-loaded RLC batching path.
Each bench builds an honest proof with a minimal in-bench reference
prover (mirroring the
honest_provehelper fromcrates/jolt-sumcheck/src/tests.rs) so the verifier exercises thefull Fiat-Shamir loop end-to-end, not just round-0 rejection.
Local numbers
apple-darwin (M1),
--warm-up-time 1 --measurement-time 3 --sample-size 10:SumcheckVerifier::verify/8SumcheckVerifier::verify/14SumcheckVerifier::verify/18SumcheckVerifier::verify/22BatchedSumcheckVerifier::verify/n_vars=14/n_claims=2BatchedSumcheckVerifier::verify/n_vars=14/n_claims=4BatchedSumcheckVerifier::verify/n_vars=18/n_claims=2BatchedSumcheckVerifier::verify/n_vars=18/n_claims=4CI
Adds
jolt-sumcheckto both the baseline (pushto main) and PRruns in
.github/workflows/bench-crates.yml, mirroring the existingfour-crate matrix.
Test plan
cargo fmt -qcargo clippy -p jolt-sumcheck --all-targets -- -D warningscargo clippy -p jolt-core --features host --all-targets -- -D warningscargo clippy -p jolt-core --features host,zk --all-targets -- -D warningscargo nextest run -p jolt-sumcheck— 42/42 passcargo nextest run -p jolt-core muldiv --features host— passcargo nextest run -p jolt-core muldiv --features host,zk— passcargo bench -p jolt-sumcheck --bench sumcheck_verifier -- --warm-up-time 1 --measurement-time 3 --sample-size 10— numbers above