Skip to content

MultilinearBatchingProver: optimize new claim computation #1604

Description

@iakovenkos

In compute_new_claim() method, we are allocating new polynomials with zeroed memory to batch instance and accumulator
` auto new_non_shifted_polynomial = bb::Polynomial(key.circuit_size);
new_non_shifted_polynomial += key.polynomials.batched_unshifted_instance;
new_non_shifted_polynomial.add_scaled(key.polynomials.batched_unshifted_accumulator, claim_batching_challenge);

auto new_shifted_polynomial = bb::Polynomial<FF>::shiftable(key.circuit_size);
new_shifted_polynomial += key.preshifted_instance;
new_shifted_polynomial.add_scaled(key.preshifted_accumulator, claim_batching_challenge);

`
This can be done more efficiently by overwriting the instance or accumulator poly with the result depending on the sizes. If Instance is >= acc, this is 7x faster than baseline, otherwise ~3x faster. Note that baseline is 3500 microseconds for polys of size $2^16$ and $2^17$. Would make sense if we have a bunch of transactions with bigger circuits.

Activity

  1. AztecBot commented on Mar 6, 2026

    @AztecBot
    Collaborator

    This issue was automatically closed because it was referenced in AztecProtocol/aztec-packages PR #21179 which has been merged to the default branch.

    View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions