Perf/inner product fused kernel#111
Open
Praz314159 wants to merge 2 commits into
Open
Conversation
The fused inner-product path already documents that a realloc per round is pricier than the capacity we carry; apply the same policy to the remaining fold sites.
round() previously did two separate fold passes plus a serial compute loop. Delegate to fused_fold_and_compute_polynomial and compute_sumcheck_polynomial (rayon-parallel, one pass), mirroring MultilinearProver. Wire format is unchanged.
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
Two small performance fixes to the per-round hot paths. All tests pass unchanged.
Performance
Apple M-series (aarch64/NEON), default features, cargo bench --bench sumcheck, criterion. Baseline = current main (9e55dc3).
inner_product/F64inner_product/F64inner_product/F64Ext3inner_product/F64Ext3inner_product/F64Ext3fold/F64fold/F64Notes:
A single fold pass over 2^24 (13.9 ms) was slower than an entire 24-round multilinear sumcheck (9.8 ms) — the shrink realloc, not the arithmetic, was the cost.
Verification
cargo test --all-features (128 tests, includes the adversarial verifier suite and legacy equality tests), cargo clippy --all-features -- -D warnings, cargo fmt --check — all