primorial(negative)

Torbjörn Granlund tg at gmplib.org
Thu Nov 19 14:06:14 UTC 2015


paul zimmermann <Paul.Zimmermann at inria.fr> writes:

  you didn't compare on the same machine,

You did not specify your machine type, right?

  and didn't give your source file so
  that people can reproduce your timings...
  
I think I did mail it.

  I just downloaded primesieve-5.5.0 from http://primesieve.org/ and on the
  same machine as CADO-NFS:
  
  zimmerma at tarte:/tmp/primesieve-5.5.0$ time ./primesieve  -t1 1000000000
  Sieve size = 32 kilobytes
  Threads    = 1
  100%
  Primes  : 50847534
  Seconds : 0.232
  
  real    0m0.249s
  user    0m0.232s
  sys     0m0.000s
  
  This is thus about 10000 times faster than GMP.
  
As marco pointed out already, this is not a correct comparison.

It is like comparing the time for bringing an egg at a time from the
store to bringing a bagful.

If you want to compare somewhat fairly, you need to loop around
"primesieve" asking for a prime at a time.

Else, compare against the (internal) prime sieve code we do have.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list