Skip to content

Divan bench for whir#267

Open
zkfriendly wants to merge 6 commits into
mainfrom
zkfr/divan-bench-for-whir
Open

Divan bench for whir#267
zkfriendly wants to merge 6 commits into
mainfrom
zkfr/divan-bench-for-whir

Conversation

@zkfriendly

@zkfriendly zkfriendly commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

The current Divan benchmarks only cover isolated pieces of the protocol (sumcheck, expand_from_coeff/NTT). There is no end-to-end WHIR benchmark in the Divan/CodSpeed setup. E2E WHIR timing does exist via the CLI in src/bin/benchmark.rs, but that tool is not a Divan bench, so it is not run in CI/CodSpeed.

This PR adds a whir Divan bench target with two E2E prover benchmarks on Basefield<Field64_3>:

  • whir_ldt β€” WHIR as a low-degree test, with no linear forms or evaluation claims (commit + prove only).
  • whir_pcs β€” WHIR as a polynomial commitment scheme, with 2 multilinear evaluation openings, following the PCS path in benchmark.rs.

Both sweep vector sizes from 2^16 to 2^21 using fixed protocol parameters (128-bit security, 20 PoW bits, folding factor 4, Blake3). Setup work (vector construction, PCS evaluation computation) stays in with_inputs; the timed section runs the full WHIR prover flow through a shared run_whir helper (domain separator, commit, prove).

Test plan

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --all-features -- -Dwarnings
  • cargo test --release --all-features --all-targets (includes compiling/running the new whir bench)
  • Confirm CodSpeed picks up the new whir bench on merge (cargo codspeed build / cargo codspeed run)

@codspeed-hq

codspeed-hq Bot commented Jul 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

βœ… 10 untouched benchmarks
πŸ†• 8 new benchmarks
⏩ 22 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
πŸ†• Simulation whir_ldt[1048576] N/A 4.2 s N/A
πŸ†• Simulation whir_ldt[2097152] N/A 8.6 s N/A
πŸ†• Simulation whir_ldt[262144] N/A 1.5 s N/A
πŸ†• Simulation whir_ldt[65536] N/A 882.1 ms N/A
πŸ†• Simulation whir_pcs[1048576] N/A 4.9 s N/A
πŸ†• Simulation whir_pcs[2097152] N/A 8.9 s N/A
πŸ†• Simulation whir_pcs[262144] N/A 1.1 s N/A
πŸ†• Simulation whir_pcs[65536] N/A 530.5 ms N/A

Comparing zkfr/divan-bench-for-whir (0a71a91) with main (10aa7d0)

Open in CodSpeed

Footnotes

  1. 22 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@zkfriendly
zkfriendly force-pushed the zkfr/divan-bench-for-whir branch from f7fae70 to 3e4f3aa Compare July 16, 2026 09:32
@zkfriendly
zkfriendly requested a review from dcbuild3r July 16, 2026 10:01
@zkfriendly
zkfriendly marked this pull request as ready for review July 16, 2026 12:18
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.

1 participant