tg at gmplib.org
Fri Nov 13 19:07:24 UTC 2015
paul zimmermann <Paul.Zimmermann at inria.fr> writes:
you can also consider the file utils/getprime.c from CADO-NFS:
zimmerma at tarte:~/svn/cado-nfs/utils$ gcc -O3 -g -DMAIN getprime.c
zimmerma at tarte:~/svn/cado-nfs/utils$ time ./a.out 1000000000
This is almost 1000 times faster than GMP.
1000 times faster than mpz_nextprime, sure. But that's not a very fair
comparison as one is set up to generate many primes while the other is
set up to generate one prime at a time.
Here is some new code:
$ gcc49 -std=c99 -O2 ehb3sieve.c && /usr/bin/time ./a.out 1000000000
0.55user 0.00system 0:00.55elapsed 99%CPU
Which is more than 4 times faster than CADO-NFS. :-)
Please encrypt, key id 0xC8601622
More information about the gmp-discuss