Talk:Sieve of Eratosthenes: Difference between revisions
Content added Content deleted
(→Java) |
(→Java) |
||
Line 92: | Line 92: | ||
}</lang> |
}</lang> |
||
The problem here is the concept of removing values. Even the "optimisation" of filling nums with odd values is no optimisation at all. |
The problem here is the concept of removing values. Even the "optimisation" of filling nums with odd values is no optimisation at all. Trying to sieve 40004 for the posted algorithm takes around 3.292s ("optimised") while the algorithm above takes 0.006s and the bitset sieve clocks at 0.008s. Thanks |
||
--[[User:Xelamitchell|xelamitchell]] |
--[[User:Xelamitchell|xelamitchell]] |