Skip to content

perf: direct element-wise subtraction for LagrangeBasis refs#124

Open
KENILSHAHH wants to merge 1 commit intomegaeth-labs:mainfrom
KENILSHAHH:perf/lagrange-basis-sub-optimization
Open

perf: direct element-wise subtraction for LagrangeBasis refs#124
KENILSHAHH wants to merge 1 commit intomegaeth-labs:mainfrom
KENILSHAHH:perf/lagrange-basis-sub-optimization

Conversation

@KENILSHAHH
Copy link
Copy Markdown

Summary

  • Replace self.clone() + (-rhs) with direct element-wise subtraction in Sub<&LagrangeBasis> for &LagrangeBasis
  • Eliminates 2 unnecessary Vec<Fr> heap allocations (one for clone, one for negation) per subtraction
  • Reduces 3 full passes over 256 field elements down to 1

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.

1 participant