4 ms·
I've used that paper as the impetuous for writing a few sieve algorithms (see [1] and [2]). While reasonably elegant in Haskell, my personal experience is that
by EricBurnett 14y ago
I've used that paper as the impetuous for writing a few sieve algorithms (see [1] and [2]). While reasonably elegant in Haskell, my personal experience is that list-of-generator style programs cannot compare to array-based sieves for performance, due to the overhead of switching between generators all the time. Not to denigrate the main point, of course - asymptotic runtimes are far more important than implementation overheads for calculating primes.
[1] http://www.thelowlyprogrammer.com/2010/03/writing-efficient-seive-of-eratosthenes.html http://www.thelowlyprogrammer.com/2010/03/writing-efficient-...
[2] http://www.thelowlyprogrammer.com/2012/08/primes-part-2-segmented-sieve.html http://www.thelowlyprogrammer.com/2012/08/primes-part-2-segm...