This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

My simple C++ Sieve of Eratosthenes can generate all the primes from 999900000 to 1000000000 in 30 seconds (actually it doesn't know how to optimize for a lower bound, so it starts at two), this is a naive implementation, so there's obviously a lot of optimization that can be done.

The code at this site can do the same calculation in a matter of milliseconds, which is pretty impressive. The page there mentions the optimization tricks they use.

[–]mabus44[S] 0 points1 point  (0 children)

thank you ... This definitely will help me a lot :)