Repository navigation
Perf: Covector reuse and parallelization (20% less proving time) - #513
Open
zkfriendly wants to merge 3 commits into
Open
zkfriendly wants to merge 3 commits into
zkfriendly wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CSP benchmarks
Prover time, peak RSS, peak heap, and verifier time are arithmetic means across the iterations. Peak heap comes from the largest Each metric cell shows the current value followed by the percentage delta against the latest successful Results
|
This branch was successfully 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.
Covector reuse and parallelization
~20% less commitment and proving time by reusing covector evaluations and parallelizing accumulation.
On$A$ , $B$ , and $C$ covectors. It also computes the public-input evaluation when needed. Before WHIR, it computes these dot products again, repeating field arithmetic and reads of the same witness entries. Covector accumulation also runs sequentially.
main, the single-commitment prover computes witness evaluations for theThis PR passes the existing evaluations directly to WHIR, preserving the covector order. Each claim remains$L_a(w)=\sum_i a_i,\iota(w_i)$ , where $\iota$ embeds witness values into the evaluation field. Accumulation uses $u_i \leftarrow u_i+\lambda a_i$ ; these independent updates now run in parallel over the stored prefix. Padding stays unchanged. The proof protocol and opening claims stay unchanged.
At$2^{20}$ witness entries, commitment and proving time falls 19.3% for Goldilocks and 15.5% for BN254.
Local squaring-chain benchmarks use Apple M4 Max, eight threads, ZK commitments, and SHA-256. Each value averages three runs after one warmup. All 32 proofs verified across the main and PR runs. Timings exclude fixture generation, setup, and verification. Main and PR use separate build directories.
Main baseline:
1a16b24492fd08b3f0469a26a7da0441381e87f5.Measured optimization:
6aee9fed14461eb28424dbbfe386a3d66677d16b; the current revision keeps the same proving code.CSP benchmarks do not yet support Goldilocks. These results come from the manual benchmark; CI remains unchanged.
Run the benchmark:
RAYON_NUM_THREADS=8 cargo test --locked --release -p provekit-fixtures \ --test profile field_benchmarks -- --exact --ignored --nocapture