-
-
Notifications
You must be signed in to change notification settings - Fork 712
Try to optimize integral basis computation for global function fields over prime finite fields #41242
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: develop
Are you sure you want to change the base?
Try to optimize integral basis computation for global function fields over prime finite fields #41242
Conversation
|
It looks good to me! Do you have any idea about when or why one algorithm is faster than the other depending on cases? In other words, any criterion to choose an algorithm for a particular case? By the way, why doc build failed? |
No clue about why (I actually expected the new version to always be faster since both call Singular but the new version calls a Singular function intended for this exact computation). As for when, I have a guess, but I'm not certain. If we let the defining polynomial of the function field be Singular does have two algorithms to compute this, and I am using the slower one ("global") here that works on a larger variety of function fields. The faster version is "hensel", but some tests fail when I try to use it (I don't think "hensel" works for all cases that "global" works for). There is definitely more optimization that should be done in future PRs (hence the
Docbuild has been broken for a few weeks (see #40929). I don't think it was broken by any code changes, but rather we are hitting CI usage limits so we need to be smarter now about how we use the CI. #41156 supposedly should help with that once it is ready. |
|
Your tests show similar results on my machine. I think this is a major improvement. Thanks! |
#41248 fixes doc-build. It needs review. |
|
Clean merge, setting back to positive review. (I did the merge to trigger CI to test the behaviour of the CI fix label and #41248.) |
Some work on #40147 for a case that Singular handles well.
This PR modifies the
_maximal_order_basismethod for function fields to call Singular's integralBasis function directly when possible.This is slightly slower for some function fields that were previously fast (but is still fast enough), and is significantly faster for some function fields that previously were very slow.
A few timing examples follow. The performance of
F_inv._maximal_order_basis()is important because it is needed to do computations with infinite places ofF.Example 1
Using the same example from #40147:
Before:
After:
The new version computes
F_inv._maximal_order_basis()in 1/14 the time as the old version.Example 2
New code performance noticeably worse here, but is still fast enough considering this computation is performance once per function field.
Before:
After:
New version is about 10 times slower here.
Example 3
This example is genus 25.
Before:
After:
So this speeds up the worst-case performance by a lot, but slows down performance for other cases. This function only needs to be computed once per function function, so maybe this is a worthwhile trade-off.
📝 Checklist