lambdaworks icon indicating copy to clipboard operation
lambdaworks copied to clipboard

Optimize composition polynomial commitment to remove extra clones

Open GarmashAlex opened this issue 1 month ago • 0 comments

Refactor crates/provers/stark/src/prover.rs commit_composition_polynomial to construct final Merkle leaf rows in a single pass using reverse_index(2i) and reverse_index(2i+1) for each part, removing the previous transpose + bit-reverse + merge pipeline and eliminating redundant allocations and clones; this preserves the exact leaf ordering and the opening contract used by open_composition_poly and the verifier so commitments, proofs, and outputs remain unchanged while reducing memory traffic and improving performance for large LDE domains.

GarmashAlex avatar Oct 19 '25 20:10 GarmashAlex