|
|
|
|
|
by bjoli
3175 days ago
|
|
I implemented that in chez scheme recently, and it is pretty darn fast. https://bitbucket.org/bjoli/primes/src (the file lazy-prime-sieve.scm) it uses Nietzsche which can be found in my repos. On my three year old computer, it computes the first ten million primes in about 40 seconds (up to, and including 179424673). That is only about 4 times slower than the optimized non-lazy naive sieve. |
|
I imagine computing the first ten million primes once upon a time required a super computer and hundreds of hours.