20060119, 04:11  #45 
Nov 2003
2·1,811 Posts 
Re: dodeca3
R. Gerbicz
Thanks for your quick reaction! The new version is indeed up to 2 times faster than before. I'll now check whether it correctly detects already known DodecaProths. Once I wrote a similar program to search for a long arithmetic progression of primes so I have some /limited/ experience. 
20060120, 12:23  #46 
Jul 2005
182_{16} Posts 
Dodecaproth n 'weights'
I'm defining the 'weight' of an n as the number of PRP tests that dodeca_30 needs to perform when checking that n for a range of 0,10T.
The lower the weight the faster it will be to check that n. The higher the weight the slower it will be. n=80 weight=45489 n=81 weight=50735 n=82 weight=36134 n=83 weight=31322 n=84 weight=79800 n=85 weight=11925 n=86 weight=71370 n=87 weight=46678 n=88 weight=10297 n=89 weight=452294 n=90 weight=19023 n=91 weight=31650 n=92 weight=57436 n=93 weight=18424 n=94 weight=76983 n=95 weight=17651 n=96 weight=23206 n=97 weight=72811 n=98 weight=77654 n=99 weight=86727 n=89 sticks out somewhat! And I've already taken n=88 :) 
20060120, 16:19  #47  
"Robert Gerbicz"
Oct 2005
Hungary
5B1_{16} Posts 
Quote:
dodeca_2_5: Number of Prp tests=1225 Time=46 sec. dodeca_3_0 Number of Prp tests=45391 Time=23 sec. So it isn't very important the number of prp tests, see my mpz_powm() instruction for n=89 bits modulus takes about say 50000 clock cycles, so if we are checking 45391 prp tests, then that take about 2*10^9 clock cycles or about 1.3 sec. for my pc ( 1.7 GHz ), so the prp testing time is about 5% of the total time, 95% is the sieving time! That was the reason why I've decreased all parameters in 2_5 version of dodeca program. I've also defined the weight of n ( for dodeca numbers ). See post #28 in this thread. Last fiddled with by R. Gerbicz on 20060120 at 16:21 

20060124, 22:01  #48 
Nov 2003
2·1,811 Posts 
R.Gerbicz
Why is k maxed to 2^60 in dodeca.c? There are 4 more bits in 8byte unsigned int and furthermore, if you keep k/105 instead of k, the range can be extended to 105*(2^641) without using gmp variables, not so?

20060124, 22:02  #49 
"Robert Gerbicz"
Oct 2005
Hungary
31·47 Posts 
new dodeca program version 4.0
In this version there is no limitation on k, and I've also decreased prime_limit from 2000 to 1000 ( and try also O1 optimization flag ).
See the attachment for the code. Or download exe from http://www.robertgerbicz.tar.hu/dodeca_4_0.exe 
20060125, 14:27  #50 
Nov 2003
3622_{10} Posts 
My first tests indicate that ver.4 is about 30% slower than ver.3. Please tell me, can I use ver.3 to test n=103 for k<2^60 (by removing the n>=100 condition from the source).

20060125, 14:49  #51  
"Robert Gerbicz"
Oct 2005
Hungary
31×47 Posts 
Quote:
Note that in all of the new programs now you can change sieve_limit in the source and to do this you have to change also number_of_primes, because there is an error checking for this in the program, you can also change block_length and magic_constant, and of course magic_constant>=block_length>=sieve_limit has to be true . But note that in hexadeca program you can change only sieve_limit ( and number_of_primes ), don't change block_length otherwise the program won't search for the whole interval for n=76 ( there is no magic_constant for this hexadeca ). I've changed the source in dodeca_4_0 to use sieve_limit=2000 and number_of_primes=303 but this was still slower by 7% for n=99. I don't know why perhaps because we are using in that part mpz_t integers and not long variables. 
