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/



Reply via email to