mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Conjectures 'R Us

Reply
 
Thread Tools
Old 2010-04-15, 17:29   #1
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

141518 Posts
Default Calculating increase in testing time

I recall that, on numerous occasions, Gary mentioned that primality testing time increases proportionately to the square of the n-range, and I think he mentioned it holds true for other bases as well. However, I'm having a hard time utilizing this rule to calculate the expected testing time at n=2M on my R2 odd-n reservation based on what I'm seeing at n=1.6M.

What I tried doing was setting it up as a standard proportion and solving for x (the number of hours to do a test at 2M). Since tests are taking almost exactly 1 hour apiece at 1.6M, that would be:
\frac{1}{1600000^2} = \frac{x}{2000000^2}
When I solve for x, I get x = 1.5625. But that can't be right--only ~1.5 hours for a 2M test? As I recall, when we did Sierp. base 4 tests at that level a few years ago they took about 4 hours.

I'm sure there's something exceedingly simple that I missed about this. If someone could enlighten me as to where I went wrong, it would be greatly appreciated!
mdettweiler is offline   Reply With Quote
Old 2010-04-15, 18:26   #2
axn
 
axn's Avatar
 
Jun 2003

22×33×47 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
When I solve for x, I get x = 1.5625. But that can't be right--only ~1.5 hours for a 2M test?
Sounds about right. Naturally, this is only true if the tests are for same base and same/similar sized k's.
axn is offline   Reply With Quote
Old 2010-04-15, 18:26   #3
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17·251 Posts
Default

Just calculated this data:
approx. time for 349*2^1000000-1: 980s (FFT 64K, ~.98 ms/iter * 1M iter)
approx. time for 349*2^1600000-1: 3040s (FFT 112K, ~1.9 ms/iter * 1.6M iter)
approx. time for 349*2^2000000-1: 4200s (FFT 128K, ~2.1 ms/iter * 2M iter)
ratio 2M/1.6M: 1.3816

Looks about right to me. In fact, because of where they fall in the FFT divisions, (see table) the ratio is lower than your theoretical one of 1.5625.
Code:
k = 349
n(min) = 1000000
n(max) = 2000000

The following FFT lengths would be used:

    fftlen       nmax
-----------------------
     65536    1048197
     81920    1301999
     98304    1550800
    114688    1802602
    131072    2060403
Maybe the base 4 tests you're referring to were themselves closer to n=2M, (being equivalent to 2^4M) or were on a slower CPU? At 1 hour for 2^1.6M, you should expect to take 4 hours per test at 2^3.2M or 4^1.6M.

Last fiddled with by Mini-Geek on 2010-04-15 at 18:26
Mini-Geek is offline   Reply With Quote
Old 2010-04-15, 18:34   #4
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Just calculated this data:
approx. time for 349*2^1000000-1: 980s (FFT 64K, ~.98 ms/iter * 1M iter)
approx. time for 349*2^1600000-1: 3040s (FFT 112K, ~1.9 ms/iter * 1.6M iter)
approx. time for 349*2^2000000-1: 4200s (FFT 128K, ~2.1 ms/iter * 2M iter)
ratio 2M/1.6M: 1.3816

Looks about right to me. In fact, because of where they fall in the FFT divisions, (see table) the ratio is lower than your theoretical one of 1.5625.
Code:
k = 349
n(min) = 1000000
n(max) = 2000000
 
The following FFT lengths would be used:
 
    fftlen       nmax
-----------------------
     65536    1048197
     81920    1301999
     98304    1550800
    114688    1802602
    131072    2060403
Maybe the base 4 tests you're referring to were themselves closer to n=2M, (being equivalent to 2^4M) or were on a slower CPU? At 1 hour for 2^1.6M, you should expect to take 4 hours per test at 2^3.2M or 4^1.6M.
Hey, would you know! Thanks axn and Mini-Geek--glad to hear I was on the right track.

Regarding the base 4 tests, see here, from our earlier mini-drive on S4 k=64494. In that post is a figure of 7000 seconds/test--about 1 hour 56 minutes--at 885K base 4 (n=1.7M base 2). Perhaps it's all in the k--k=39687 on my R2-odd reservation vs. k=64494 on the S4 mini-drive?

Last fiddled with by mdettweiler on 2010-04-15 at 18:35 Reason: fix link
mdettweiler is offline   Reply With Quote
Old 2010-04-17, 04:39   #5
gd_barnes
 
gd_barnes's Avatar
 
May 2007
Kansas; USA

28A316 Posts
Default

Max, it's easier to do simple division and square it:

( 2M / 1.6M ) ^ 2 = 1.5625 or 56.25% longer for n=2M vs. n=1.6M tests.

That's it.

The main factor here is where the fftlen changes lie. If the ratio of the division, i.e. 2M/1.6M, is large, the fftlen change points will have little effect on this ratio but if it is small, they will have a greater effect. In this case, the ratio is fairly small at 1.25 so your n=2M tests would likely be anywhere from ~35% to 75% longer.
gd_barnes is online now   Reply With Quote
Old 2010-04-17, 10:59   #6
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

11000011010012 Posts
Default

Quote:
Originally Posted by gd_barnes View Post
Max, it's easier to do simple division and square it:

( 2M / 1.6M ) ^ 2 = 1.5625 or 56.25% longer for n=2M vs. n=1.6M tests.

That's it.

The main factor here is where the fftlen changes lie. If the ratio of the division, i.e. 2M/1.6M, is large, the fftlen change points will have little effect on this ratio but if it is small, they will have a greater effect. In this case, the ratio is fairly small at 1.25 so your n=2M tests would likely be anywhere from ~35% to 75% longer.
Ah, right, I hadn't throught of that...I'll remember that for the future, it should indeed be somewhat quicker than having to worry about all those huge squared numbers on paper.
mdettweiler is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will participation increase again? wouter Lounge 7 2005-02-26 21:50
Release more exponents for first-time testing? GP2 Data 10 2004-01-02 04:17
Graph of leading edge of LL testing (and double-checking) over time GP2 Data 10 2003-11-17 14:55
Exponents to re-release for first-time testing: "harmful" errorcodes GP2 Data 4 2003-10-18 22:08
AKS - A polynomial-time algorithm for testing primality. Maybeso Math 11 2002-11-20 23:39

All times are UTC. The time now is 09:40.


Tue Jul 27 09:40:01 UTC 2021 up 4 days, 4:09, 0 users, load averages: 2.15, 1.99, 1.88

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.