Skip to content

feat: unreduced accumulation#281

Draft
yoaveshel wants to merge 2 commits into
av_gkr_compilerfrom
ye_unreduced_accum
Draft

feat: unreduced accumulation#281
yoaveshel wants to merge 2 commits into
av_gkr_compilerfrom
ye_unreduced_accum

Conversation

@yoaveshel

Copy link
Copy Markdown

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?

  • Yes
  • No

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted.

@yoaveshel yoaveshel marked this pull request as draft April 28, 2026 10:59
@yoaveshel yoaveshel requested review from mabbamOG and shamatar April 29, 2026 07:19
Comment thread field/src/baby_bear/unreduced.rs
}

impl UnreducedAccumulator<BabyBearField, BabyBearExt4> for BabyBearExt4RawProductSum {
const ZERO: Self = Self::ZERO;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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