Profile for nmod_poly_interpolate and improvements of interpolation at points in geometric progression#2659
Merged
Merged
Conversation
…ar multiplication with precomputation when the modulus has <= 63 bits
…rogression), and minor enhancements
… points in precomputation differs from the number of values to interpolate
second step of geometric interpolate: explain computation
…lify precomputations by removing data that is not used anymore
improve mulmid in evaluate
interpolation - documentation contained sometimes `len`, sometimes `n` for the number of points, with `n` also used for the modulus value in close-by functions: unify to `len` for the number of points; or `ilen` (input length) and `olen` (output length) when necessary - some cleaning in impl.h, making these functions static - minor fix in the profile and interpolation function to avoid some memory leak
Collaborator
|
LGTM. Feel free to merge both PRs if you're happy with them. |
Collaborator
Author
|
Thanks for the feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR follows on from #2657 and focuses on improving interpolation. It
nmod_poly_interpolatefor general points and for points in geometric progression,mulmidAnd, for interpolation at a geometric progression:
Conclusions from timings (below, for 63 bits, and AMD zen4):
lenpoints in geometric progression is the cost of two polynomial multiplications in degreelen, and we can see that the observed timings are very close to this even when counting the precomputations in, as soon as the number of points exceeds 12 or so (it is sometimes even better than two multiplications, probably due to some thresholds).