Skip to content

Revert 471 perf/first sumcheck round in base#479

Closed
BornPsych wants to merge 7 commits into
mainfrom
revert-471-perf/first-sumcheck-round-in-base
Closed

Revert 471 perf/first sumcheck round in base#479
BornPsych wants to merge 7 commits into
mainfrom
revert-471-perf/first-sumcheck-round-in-base

Conversation

@BornPsych

@BornPsych BornPsych commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Reverts #471 since the earlier base was with the #470 not with the main

shreyas-londhe and others added 7 commits July 9, 2026 06:57
Two #[ignore] probes for manual profiling: a size sweep (BF vs EF vs bn254,
2^14..2^20) and a 2^20 goldilocks-BF flamegraph + stage breakdown. Timing
excludes scheme construction and harness clones (prove_setup builds inputs
outside the timer; time_prove_core measures only commit + prove_noir), and
the flame layer installs after fixture generation, so the numbers reflect
the true prove core. Profiling-only deps (inferno, tracing-flame).
cargo fmt rewrapping of comments trimmed in earlier commits; no code change.
Round 1 of the Spartan sumcheck can consume base-field a, b, c directly
(one mixed mul per point against the ext eq) instead of lifting them
first; the fold at the first challenge does the lift. These helpers
provide that round evaluation and fold, with parity against the
existing fused ext path pinned by tests.
The witness bounds a, b, c were lifted to the extension before the
sumcheck, paying ext arithmetic on base data for every round. The first
round (half the sumcheck work) now consumes them directly — base
products with one mixed mul per point against the ext eq — and the fold
at the first challenge does the lift. Transcript values are unchanged
(subfield arithmetic, same elements), so the verifier and proof format
are untouched; bn254 rides the same path via Identity.

~5% prove @2^20 goldilocks-BF, no bn254 regression.
- prover: precompute 1/2 once and pass it into combined_round_message
  instead of recomputing a field inverse every round (transcript-identical)
- deps: move inferno/tracing-flame to root [workspace.dependencies]
- fixtures: relocate the single-commit timed prove into harness.rs and
  point the flamegraph probe at target/profile/
perf(prover): run the first sumcheck round in the base field
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-provekit-org Ready Ready Preview Jul 13, 2026 11:15am

Request Review

@github-actions

Copy link
Copy Markdown

CSP benchmarks

Metric Value
Workflow status [PASS] success
Commit 546bcefb8e2a
Run #29245632375
Circuits benchmarked 21
Iterations averaged per circuit 3

Prover time, peak RSS, peak heap, and verifier time are arithmetic means across the iterations. Peak heap comes from the largest peak memory entry in provekit-cli prove's tracing output; peak RSS is reported by /usr/bin/time -v (max-resident-set-size).

Each metric cell shows the current value followed by the percentage delta against the latest successful main run #29241494386. (new) marks circuits absent from the baseline.

Results
Circuit Constraints Witnesses Prover time Peak RSS Peak heap Verifier time Proof size PKP size
ecdsa_p256 143,321 (±0.0%) 258,215 (±0.0%) 1.74 s (±0.0%) 228 MB (±0.0%) 188 MB (±0.0%) 90 ms (±0.0%) 304 KB (-0.1%) 811 KB (±0.0%)
keccak_1024 788,814 (±0.0%) 1,490,812 (±0.0%) 5.11 s (+0.3%) 896 MB (±0.0%) 874 MB (±0.0%) 450 ms (+2.3%) 370 KB (-0.2%) 5.88 MB (±0.0%)
keccak_128 157,522 (±0.0%) 304,529 (±0.0%) 1.23 s (+1.7%) 235 MB (±0.0%) 202 MB (±0.0%) 110 ms (±0.0%) 309 KB (-0.2%) 1.26 MB (±0.0%)
keccak_2048 1,507,374 (±0.0%) 2,840,532 (±0.0%) 10.15 s (+0.4%) 1.70 GB (±0.0%) 1.68 GB (±0.0%) 850 ms (+1.2%) 391 KB (+0.2%) 11.97 MB (±0.0%)
keccak_256 247,782 (±0.0%) 474,010 (±0.0%) 1.42 s (+1.0%) 293 MB (+1.0%) 249 MB (±0.0%) 150 ms (±0.0%) 331 KB (+1.8%) 1.88 MB (±0.0%)
keccak_512 428,126 (±0.0%) 812,944 (±0.0%) 2.66 s (+1.9%) 541 MB (±0.0%) 455 MB (±0.0%) 253 ms (+2.7%) 348 KB (-0.9%) 3.32 MB (±0.0%)
poseidon2_12 479 (±0.0%) 563 (±0.0%) 40 ms (+9.0%) 12.45 MB (+1.5%) 3.26 MB (±0.0%) 73.75 KB (+1.1%) 436 KB (±0.0%)
poseidon2_16 556 (±0.0%) 719 (±0.0%) 40 ms (+9.0%) 12.81 MB (-0.1%) 3.46 MB (±0.0%) 10 ms (±0.0%) 73.98 KB (-2.9%) 530 KB (±0.0%)
poseidon2_2 231 (±0.0%) 278 (±0.0%) 30 ms (±0.0%) 11.44 MB (-0.1%) 2.72 MB (±0.0%) 67.61 KB (-0.6%) 108 KB (±0.0%)
poseidon2_4 529 (±0.0%) 535 (±0.0%) 33 ms (±0.0%) 11.74 MB (+0.4%) 2.86 MB (±0.0%) 73.02 KB (-0.7%) 31.66 KB (±0.0%)
poseidon2_8 363 (±0.0%) 423 (±0.0%) 37 ms (+22.3%) 12.38 MB (+0.6%) 3.15 MB (±0.0%) 72.01 KB (+2.1%) 365 KB (±0.0%)
poseidon_12 504 (±0.0%) 524 (±0.0%) 40 ms (±0.0%) 12.86 MB (+0.6%) 3.53 MB (±0.0%) 10 ms (±0.0%) 72.39 KB (-1.3%) 569 KB (±0.0%)
poseidon_16 609 (±0.0%) 633 (±0.0%) 40 ms (±0.0%) 13.25 MB (-0.3%) 3.98 MB (±0.0%) 10 ms (±0.0%) 73.65 KB (-0.3%) 717 KB (±0.0%)
poseidon_2 240 (±0.0%) 249 (±0.0%) 30 ms (±0.0%) 11.40 MB (-0.4%) 2.68 MB (±0.0%) 66.88 KB (+0.2%) 59.18 KB (±0.0%)
poseidon_4 297 (±0.0%) 309 (±0.0%) 30 ms (±0.0%) 12.00 MB (±0.0%) 3.10 MB (±0.0%) 68.67 KB (-1.6%) 332 KB (±0.0%)
poseidon_8 402 (±0.0%) 418 (±0.0%) 30 ms (±0.0%) 12.31 MB (+0.1%) 3.29 MB (±0.0%) 71.54 KB (-0.2%) 448 KB (±0.0%)
sha256_1024 196,940 (±0.0%) 339,764 (±0.0%) 1.32 s (+0.8%) 267 MB (-1.3%) 236 MB (±0.0%) 160 ms (±0.0%) 314 KB (-0.2%) 1.88 MB (+0.3%)
sha256_128 46,398 (±0.0%) 80,974 (±0.0%) 323 ms (+1.0%) 75.29 MB (-1.9%) 55.50 MB (±0.0%) 40 ms (±0.0%) 271 KB (-9.4%) 508 KB (+1.1%)
sha256_2048 345,399 (±0.0%) 612,724 (±0.0%) 2.61 s (+0.6%) 519 MB (+0.7%) 436 MB (±0.0%) 300 ms (±0.0%) 341 KB (-0.1%) 3.13 MB (+2.4%)
sha256_256 67,904 (±0.0%) 117,944 (±0.0%) 577 ms (+1.8%) 122 MB (-2.0%) 98.23 MB (±0.0%) 60 ms (±0.0%) 280 KB (+0.9%) 706 KB (+0.5%)
sha256_512 110,916 (±0.0%) 191,884 (±0.0%) 690 ms (+0.5%) 150 MB (±0.0%) 126 MB (±0.0%) 90 ms (±0.0%) 294 KB (±0.0%) 1.11 MB (+0.4%)

@BornPsych BornPsych closed this Jul 13, 2026
@BornPsych BornPsych deleted the revert-471-perf/first-sumcheck-round-in-base branch July 13, 2026 11:50
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.

2 participants