From: Dee Zsombor Date: 2005-06-27T17:45:40+09:00 Subject: Re: I saw the beauty of Ruby Re: 1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds I realy dont think that language choice weighs anything when there is a better algorithm available: the Atkin sieve. Sample implentation in C generates the 50847534 primes up to 1000000000 in just 8 seconds on a Pentium II-350. It is not that was implented in C, rather the algorithm used O(n/log(log(n))) instead of the vairous 'optimized' but basicaly inferiour Sieve of Eratosthenes disussed here. There is also a primegen library making with a clean interface, so with a bit of SWIG magic you can call this beast from Ruby too. --- http://deezsombor.blogspot.com/