feat: unreduced accumulation#281
Draft
yoaveshel wants to merge 2 commits into
Draft
Conversation
shamatar
reviewed
May 3, 2026
| } | ||
|
|
||
| impl UnreducedAccumulator<BabyBearField, BabyBearExt4> for BabyBearExt4RawProductSum { | ||
| const ZERO: Self = Self::ZERO; |
Member
There was a problem hiding this comment.
If you want to micro-optimize, then you should check the assembly to see it a sequence of making 0 accumulator and then adding first pair is optimized out by llvm. If not - most likely you want to add a constructor from pair itself, and a function for fixed-sized loops (where loop/input size is const generic) where first iteration is unrolled as constructor and loop size is asserted >0
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.
What ❔
Proof of concept for unreduced accumulation in prover. Applied to step 0 of batched sumcheck and resulted in a ~2.1s reduction in prover time for add sub (without self-checks). Benches show 3x improvement compared to Montgomery reduction at every op.
To integrate this to later steps we need to implement the split eq and small value optimisations from https://eprint.iacr.org/2026/587.pdf
Why ❔
Is this a breaking change?
Checklist