The Genuine Sieve of Eratosthenes | Lambda the Ultimate

December 14, 2008 | Math | By: Mark VandeWettering

A while ago, I got interested in reimplementing various versions of the Sieve of Eratosthenes. I eventually tacked together a threaded version that could calculate all the primes up to a trillion in about 20 minutes, and then kind of got bored. Today, however, there’s an interesting link to an article on Lambda the Ultimate about sieves. In particular, it makes the claim that the normal “sieve” code that people use to illustrate the effectiveness of functional programming languages isn’t actually a sieve at all. Interesting!

The Genuine Sieve of Eratosthenes | Lambda the Ultimate.

Comments

Comment from Vishal Sapre
Time 4/23/2009 at 2:39 am

Hi Mark,

I would like to learn more about threaded applications. If its OK for you, could you send me code for the threaded version of Sieve of Eratosthenes.

Thanks and best regards,
Vishal Sapre