ProjectEuler problem 35
Jay Norwood
jayn at prismnet.com
Sun May 20 17:12:53 PDT 2012
On Sunday, 20 May 2012 at 15:48:31 UTC, Stewart Gordon wrote:
> On 19/05/2012 16:13, maarten van damme wrote:
> Yes, that's a common optimisation. Faster still would be to
> test 6k-1 and 6k+1 for each positive integer k. Indeed, I've
> done more than this in my time: hard-coded all the primes up to
> 30 and the residues modulo 30 that can possibly be of primes
> above 30.
>
> Stewart.
This person has done a number of optimizations. He gets some
speed-up by storing in bits rather than bytes. It is also
designed for segments that fir in the L1 cache.
http://code.google.com/p/primesieve/
More information about the Digitalmars-d-learn
mailing list