A beautifull day,

I think the Sieve of Eratosthenes is faster for a small range than the 
quadratic prime sieve, because it needs only one cycle to mark the nonprimes.
The quadratic prime sieve is slower at the beginning, because it needs 2 
Division resp. 8 Cycles for sieving. But nevertheless the sieve of Eratosthenes 
finds x / ln (x) primes. 
The quadratic prime sieve finds  ~1.4*x Primes. ( I have to examine 3 Polynoms 
which share the same memory, therefore i got more primes than list_max) For 
bigger list_max the quadratic prime sieve has to be faster than the sieve of 
Erathostenes.

Some small results:

// Liste_max        Primes       Numbers of Division   Ram        Time 

     10.000           15.164          121.206                     0.008 s
    100.000          148.728        1.349.584                     0.051 s
  1.000.000        1.469.361       14.623.080                     1.01  s
 10.000.000       14.575.399      155.732.248        87 MB       11.43  s
100.000.000      144.809.487    1.639.173.796       722 MB      152.23  s       
 

Best greetings from the primes
Bernhard Helmes 
-- 
www.devalco.de
www.beablue.de

Tel.: 0241 / 99 77 55 22 in Germany (0049)





GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
_______________________________________________
Prime mailing list
[email protected]
http://hogranch.com/mailman/listinfo/prime

Reply via email to