Thread: AVX-ECM
View Single Post
Old 2020-11-30, 16:32   #78
bsquared's Avatar
Feb 2007

64538 Posts

Originally Posted by bsquared View Post
In my tinyecm code (< 64 bits) where there are just a few fixed and very small B1 values, I found that in a few cases the cost of PRAC(p1*p2) is cheaper than PRAC(p1) + PRAC(p2). It isn't practical to test combinations of primes like this in real time for arbitrary (and larger) B1. But I wonder if it is worth compiling a list of prime pairs that are cheaper when combined below bounds like 1M, 3M, 11M, etc.
Ran a quick test attempting to pair primes < 1M. There are ~5k pairs that are cheaper this way, sometimes dramatically so1. But there are ~78k primes below this bound so the total cost savings is a fraction of a percent.

edit: nevermind - this is not valid. Have to check that the chain actually works! conclusion is unchanged - finding cheaper pairs doesn't seem worthwhile.
prime 9769 * 9781 cost = 103.5 
prime 9769 cost = 109.0 
prime 9781 cost = 103.5 
(sum 212.5, savings 109.0 @ prac v=0.620181980807)

Last fiddled with by bsquared on 2020-11-30 at 19:31 Reason: further analysis
bsquared is offline   Reply With Quote