-
Notifications
You must be signed in to change notification settings - Fork 279
Make nmod_geometric_progression faster with Shoup precomputation if possible
#2516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
Co-authored-by: Vincent Neiger <[email protected]>
|
Unfortunately, in my measurements this does not bring much. We could have hoped for some interesting speed-up in small lengths (the part that benefits from Shoup's precomputations only involves a linear number of nmod multiplications, so we expect it to be negligible in front of the polynomial multiplication as soon as the length is not too small). But even for small lengths it is not very interesting: Maybe it's not so nice to double the amount of storage for the precomputations for a marginal gain like this. Also, for lengths below about |
|
One place where Shoup's precomputation could help is in the precomputation stage itself. Similarly to what is done for |
This draft aims at improving the recent
nmod_geometric_progressionby using Shoup's precomputed form (as mentioned by @fredrik-johansson in #2449 .For now, the precomputations are done on each vectors of constants when possible (when high bit of modulus is not set).