On Saturday, 19 May 2012 at 16:43:03 UTC, Jay Norwood wrote:
On Wednesday, 16 May 2012 at 09:26:45 UTC, Tiberiu Gal wrote:
hi
many claim their code solves the problem in order of ms (
c/pascal/haskell code)
I used the blockwise parallel sieve described here, and
measured nice speed-ups as described in his blog. It completes
calculations within an L1 cache block before moving on.
Perhaps you can redesign you code to do the same...
http://create.stephan-brumme.com/eratosthenes/
Curiously I've done most of these (Although not exactly as
written). The blockwise makes sense; I've seen a prime checker JS
somewhere that uses those exact primes and if a number wasn't
divisible by them it was 'probably prime'.
All of this is good material to glance over and review though :)