20181003, 19:57  #12  
Sep 2002
Database er0rr
3,853 Posts 
Quote:
Code:
time ./gwnum_test real 0m7.823s user 0m7.860s sys 0m0.004s Code:
time ./GMP_test real 0m13.058s user 0m13.032s sys 0m0.000s 

20190126, 20:46  #13 
"Dana Jacobsen"
Feb 2011
Bangkok, TH
3^{2}·101 Posts 
Paul,
Could you send or point me to your test programs? I'd like to run on my machine to compare identical programs. I was debating the merits of doing a comparison graph at different sizes, e.g. (1000+250n for n 0 to 12). A simple way would be creating a file with 100 or 1000 random primes of the given size, then time running a program that processes them all. E.g. PFGW with the file. That seems like a fairly realistic test of performance that removes most of the startup overhead. If you made a program that did some various tests (e.g. PRP, SPRP, BPSW and/or your tests) given a file with a number per line, would that seem like a good test? For very small inputs it would be worth pulling out even that overhead (e.g. read them all into an array of inputs, then start a timer around the testing, so we don't count overhead of I/O and string>bignum conversion). 
20190126, 22:56  #14 
Sep 2002
Database er0rr
3,853 Posts 
Here you go.
Sorry for the messy code. I just hacked something together to do the comparison. Last fiddled with by paulunderwood on 20190126 at 23:42 
20200916, 09:15  #15 
"Seth"
Apr 2019
2^{2}×7×13 Posts 
GMP 6.2.0 Improved mpz_probab_prime_p for both primes and composites.
I measured the time vs pfgw over a range of inputs (200 to 160,000 bits) https://github.com/sethtroisi/miscs...mbers10p379 For composites GMP is faster till ~4000 bits and ~3x slower by 90,000 bits. For primes GMP performs more a full BailliePSW primality test and takes ~5x longer. It's slower on small primes (500 bits) and 10x slower by 15,000 bits. 
20200924, 00:30  #16  
Sep 2002
Database er0rr
3,853 Posts 
Quote:
Also PFGW uses GMP below a certain threshold. If GMP has improved PRP times then maybe the author, "rogue", should realise it in the next release of PFGW. 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Modifying the Lucas Lehmer Primality Test into a fast test of nothing  Trilo  Miscellaneous Math  25  20180311 23:20 
Do normal adults give themselves an allowance? (...to fast or not to fast  there is no question!)  jasong  jasong  35  20161211 00:57 
Pretty Fast Primality Test (for numbers = 3 mod 4)  tapion64  Miscellaneous Math  40  20140420 05:43 
Which programming language i shall learn?  kakos22  Programming  4  20100812 12:02 
Primality searches and primality successes  marco_calabresi  Information & Answers  3  20090417 19:44 