Skip to content

Conversation

@jonas-lj
Copy link
Contributor

@jonas-lj jonas-lj commented Nov 3, 2025

  • Refactor polynomial division and interpolation to make the functionality more clear.
  • Reuse the get_lagrange_coefficients function for interpolate_at_index and rename to recover_at. This gives a significant speed-up (~65%).

@jonas-lj jonas-lj marked this pull request as ready for review November 3, 2025 19:52
@jonas-lj jonas-lj requested a review from benr-ml November 3, 2025 19:52
@jonas-lj jonas-lj force-pushed the jonas/simplifications branch from 99a5ee0 to 415eab2 Compare November 17, 2025 12:07
@jonas-lj jonas-lj changed the title Misc simplifications Refactor + use existing functions Nov 17, 2025
@jonas-lj jonas-lj requested review from benr-ml and removed request for benr-ml November 19, 2025 14:24

let lagrange_coefficients = Self::get_lagrange_coefficients_for(
index.get() as u128,
points.len() as u16,
Copy link
Contributor

Choose a reason for hiding this comment

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

what if we have more than t points?

Copy link
Contributor Author

@jonas-lj jonas-lj Nov 20, 2025

Choose a reason for hiding this comment

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

It's up to the caller to only give t points - same as for recover_c0. I'm not sure I understand the need for the t parameter in those function since all it's doing is check that the given number of points is t?

@jonas-lj jonas-lj requested a review from benr-ml November 20, 2025 14:30
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.

3 participants