It probably won't win the golf, but it will go a lot higher than most. It'll handle upto 1,000,000,000 if you have 1 GB of ram.
|
And this one will go eight times higher in the same space, and should be relatively quick.
|
You could double that by not storing the evens,
In reply to Re: Sieve of Eratosthenes Golf?
by BrowserUk
in thread Sieve of Eratosthenes Golf?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |