yea, ditch the printing and append it to a list and it'll be almost instant.
Even with ditching print and returning list of primes, this algorithm is not like speed demon. It takes 6,000ms for primes up to 10,000 compared to 4ms with standard sieve algorithm.
Reputation Points: 404
Solved Threads: 180
Nearly a Posting Virtuoso
Offline 1,422 posts
since Jul 2005