diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2019-10-06 13:48:10 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2019-10-14 22:53:34 +0200 |
commit | 6c4ae41f1ca857254fc9e27edead81ff2fd3f3fe (patch) | |
tree | 8b8e73f750858783fa242dd74346d8c6b6facbc8 /test | |
parent | 3103a616dc6b3150eaec0000af767f268a647f6d (diff) |
Use fewer primes for the trial division
When using Miller-Rabin to test for primes, it's can be faster to first
do trial divisions, but when doing too many trial divisions it gets
slower again. We reduce the number of trial divisions to a point that
gives better performance.
Based on research by Jake Massimo and Kenneth Paterson
Reviewed-by: Paul Dale <paul.dale@oracle.com>
GH: #9272
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions