Repository navigation
Open
Description
Optimisations found by profiling the prover and verifier. Focus is now on the BitZ PCS (GKR, column folding, ring switching, opening, grinding); Spartan/circuit PIOP items have been closed as out of current focus.
In scope (PCS):
Forest GKR
- GKR performance: tracking issue #52 (tracks Split Suffix Table optimisation #58 / Split Suffix Table optimisation #152, Use bit-selected lookup prefixes in the GKR sumcheck #108, Fuse GKR dense folding with the next round message pass #109, Execute two GKR dense rounds from one bivariate grid pass #110, Skip structurally padded all-one GKR trees analytically #112, Add x86 carryless-multiply kernels to the GKR field backend #118, Layer 3 optimisation #144)
Opening & PCS
-
Parallelise(obsolete:build_batched_basisand defer reduction inaccumulate_claim_blockcrates/pcs/src/inner_product.rsremoved in5fa331e/ Inner Product Opening #38; inner-product sumcheck replaced bycrates/post_gkrin Post-GKR sumcheck #69, closing Replace the reference inner-product sumcheck reduction #54) - Optimize
tensor_algebra_transpose#51 (perf(pcs): optimize tensor algebra transpose with block swaps #62) - Decide whether the weight binding is redundant in the virtual path (
bind_inner_product_statementcurrently takes ~27–29 ms on both prover and verifier on 600-block SHA-256 per Three minor optimizations #149) - PCS: fold integer columns with nibble tables and shared scans #119 (integer column fold nibble tables — relevant for tall PCS shapes)
- PCS: use lookup-table kernels for ring-switch claims #120 (ring-switch LUT kernels replacing
fold_1b_rows_naive) - PCS: add a versioned dual-basis opening for virtual claims #121 (dual-basis opening for virtual claims)
- PCS: compute the first sumcheck message while building the basis #123 (precompute Ligerito round-0 message while building basis)
- Grinding: batch nonce tests with SIMD and ordered parallel search #127 (SIMD + parallel PoW grinding in
crates/transcript/src/pow.rs)
Virtual map
- Cache
MaterializedMTranspose::digestinstead of recomputing it per proof (Three minor optimizations #149) - Stop allocating a full equality table in
transpose_eq(Three minor optimizations #149)
Machinery
- Size the rayon pool to the performance cores #48 (size Rayon pool to performance cores)
Done / Closed as out of current focus (Spartan & circuit PIOP):
- Parallelise
bind_and_batch#43, Replace theBTreeMapandBTreeSetaccumulators inLinearCombination#44 (Smaller circuit terms #151), Hoist the modulus out ofbigint_to_fqand parallelise the lowering pass #45 (Improve circuit setup phase #74), Do not cloneprove_spartan_pioparguments (products, assignments) #50 (feat(spartan): Spartan PIOP optimizations #53) -
Avoid materialising the global R1CS matrix when the relation is one local circuit repeated over instances #42, Read the assignment as packed bits instead of a dense field MLE #46, Defer Barrett reduction in the Spartan sumcheck round bodies #47(closed — Spartan/circuit PIOP out of current PCS focus)
Related: #8 (merged GKR forest, closed), #7 (opener, closed), #54 (post-GKR sumcheck, closed by #69), #143 (relax PCS/GKR constraints).
Done when: every PCS item is closed or explicitly dropped, and a fresh PCS profile turns up nothing worth adding.
Metadata
Metadata
Assignees
Labels
No labels
Activity
xrvdg commentedon Sep 7, 2026
This has already been implemented or do you mean something else?
Currently being worked on.
For GKR to parallelise effectively, the leaves need to be stored row-major. That layout lets the column bits be folded last without opening gaps, and it also helps the lazy lookup of the leaves. BitTable is currently column-major. If it were row-major instead, what breaks?
shreyas-londhe commentedon Sep 8, 2026
I misread in my reading. This issue should be removed.
shreyas-londhe commentedon Sep 8, 2026
The conversion costs is ~2ms (parallel) so I would keep the BitTable column-major for now, but we can convert at the GKR boundary so you can take advantage of row-major.
frozenspider commentedon Sep 8, 2026
Attaching the profiler results from
exp/e2ebranch (f9b89b1), profilingrunexample (SHA256): e2e-608.json.gzCommands that were used:
Most of prover time, and perf optimization opportunities, come from GKR - which is not a real GKR by @xrvdg - for instance significant amount of prover time (20-30%) is taken by allocations, specifically by
to_vecinprove_product_forestwhich won't be there. So much for the time wasted 😞In addition to what @shreyas-londhe has logged, I'm adding the following tasks as a follow-up:
prove_spartan_pioparguments (products, assignments) #50tensor_algebra_transpose#51bind_and_batch#43We also can optimize$F_q$ multiplication by using Montgomery form, but expected gain is not high enough to bother.
bind_and_batchThe rest of my findings look negligible.
xrvdg commentedon Sep 9, 2026
Made a separate tracking issue for GKR: #52. Updated the issue to include the link.
zkfriendly commentedon Nov 24, 2026
Updated checklist against
main(34addac): markedbuild_batched_basis/accumulate_claim_blockas obsolete (removed in5fa331e/ #38 and superseded bycrates/post_gkrin #69, closing #54), updated the #52 link and related issue statuses, and noted current timing for virtual-path weight binding (~27–29 ms per #149).