[Shootout-list] Tcl : nsieve

Robert Seeger Robert Seeger <rhseeger@gmail.com>
Fri, 18 Mar 2005 14:58:47 -0500


Simon,

Nicely done. It hadn't occurred to me to count the number number of
numbers of primes as they were encountered on the way through the
list.

Yes, the string length was a problem, but the count you keep as your
going through is a considerable win. Very nicely done.

Rob Seeger

PS: I'm sending this along to the list too, since I didn't see it appear there.


On Fri, 18 Mar 2005 19:49:48 +0000, Simon Geard <simon@whiteowl.co.uk> wrote:
> Robert Seeger wrote:
> 
> >I updated the Tcl implementation of the nsieve test. It now uses
> >lists, since they are closer to a C array than Tcl arrays are.
> >However, even with N = 3, it takes over 2 minutes to complete on my
> >system :(
> >
> >Rob Seeger
> >
> >
> >
> >
> Robert,
> 
> I've fixed your nsieve.tcl so that it now works on ordinary time scales!
> I think the problems were that your translation was slightly inaccurate
> and that you used string lengths to signify boolean state rather than
> 1/0. The file is attached so you can see for yourself.
> 
> I have submitted this directly to the shootout list but it doesn't seem
> to have got through. Could you let me know if you have already received
> it through the list.
> 
> Thanks,
> 
> Simon Geard
> 
> 
>