Sieve of Eratosthenes

Andres Valloud andresv at ntct1.com
Mon Oct 9 23:21:39 UTC 2006


Hello Andres,

Monday, October 9, 2006, 6:13:56 PM, you wrote:

AV> Now, your machine has a 3ghz processor, and must be at least a p4
AV> or something similar. Mine is a p3/600 which is spending about 20%
AV> cpu playing stuff in Winamp with DSP plugins. I think it's ok to
AV> assume that yours is about 10 times faster than mine. This yields
AV> something comparable to Java's time, if not better.

In addition, it seems the Smalltalk code had a bug because it would
mark primes as composites.  Fixing this with

  i + i to: limit by: i do:...

makes VW run in under 700ms.  The Java code does not seem to have this
problem.

-- 
Best regards,
 Andres                            mailto:andresv at ntct1.com




More information about the Squeak-dev mailing list