-
Notifications
You must be signed in to change notification settings - Fork 215
removed obsolete check #272
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
Conversation
|
Thanks for clarifying what you meant. I wondered about this t > MP_PRIME_SIZE condition. A related question - would it make sense to remove all the code referencing on MP_PRIME_SIZE/ltm_prime_tab everywhere?
You argued before that this ltm_prime_tab is used for MP_8BIT compatibility/optimization. It seems that the is_prime function also bails out for MP_8BIT after searching the table. This special casing would then go to or what is the advantage of having that? |
Once we have a sieve? Of course. But be aware of the uncomfortable fact that that would change the API of
For on 7-bit large limb testing the first 31 primes is exhaustive, these are all primes that are in a single 7-bit limb, all primes <= 127. |
Hmm, okay. I would probably deprecate mp_prime_is_divisible/ltm_prime_tab and make them internal as s_mp_prime_is_divisible/s_mp_prime_tab. Then mp_prime_is_prime could still use it for simplicity. Then we add your new sieve code. Could we then restructure the internals such that maybe some kind of preallocated sieve is used instead of s_prime_is_divisible? |
Getting the primes for Re. global sieve: Only the use of the base segment could be made thread-safe without much work (read-only), building and removing segments would need some safeguards and would go outside of c89. BTW: it would be simpler if we have the sieve in I don't know for sure if I have all my stuff uploaded to my github repository and I'm still on my old laptop until tonight, so no rebasing of Ah, Travis tests succeeded, you can repair #269 now if you want (he said boldly ;-) ) |
|
@czurnieden Could you push this on top of #269 or should @sjaeckel do that? |
|
Ah, already done. Thanks! BTW: 7:08AM? Do you know what I get to hear if somebody sees me at such a time? "Ow, c'mon, go to bed, you ain't no 20 anymore!" ;-) |
Removed the test that checks if the number of M-R rounds is smaller
MP_PRIME_MAXShould repair the test failure in #269