-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
defer primality and irreducibility testing in GF constructor until after caching #34281
Comments
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Julien Grijalva |
comment:6
patchbot failed a test, segfaulting when it reached the |
comment:7
I suspect this is a consequence of the other doctest failures here (which I also see on the unpatched |
comment:8
I am able to reproduce this behavior locally. It seems like a bug in the perfect_power method though. I'll investigate. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
Setting to "needs review" to get the patchbot to run, but I suspect there are still problems. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
With the most recent commit, I no longer see any failures on my machine. Still not sure what causes these crashes and why things only go wrong in |
comment:13
Patchbot is morally green; I've seen the remaining failure in other (totally unrelated) tickets before. |
Changed branch from public/defer_primality_testing_in_cached_GF_constructor to |
Example:
Note that the constructor tests primality each time even though the field is already cached! This was pointed out here:
https://github.com/jack4818/Castryck-Decru-SageMath#speeding-sagemath-up-using-a-cache
In this patch, we move the primality and irreducibility testing from
FiniteFieldFactory.create_key_and_extra_args()
toFiniteFieldFactory.create_object()
, so that it isn't performed again for fields already present in the cache.The result is a massive speedup for repeated invocations of
GF(p)
:CC: @k3w1k0d3r
Component: performance
Author: Lorenz Panny
Branch/Commit:
0b9db49
Reviewer: Julien Grijalva
Issue created by migration from https://trac.sagemath.org/ticket/34281
The text was updated successfully, but these errors were encountered: