Which is the fastest algorithm to find prime numbers?


Question

Which is the fastest algorithm to find out prime numbers using C++? I have used sieve's algorithm but I still want it to be faster!

1
172
9/15/2015 1:56:46 PM

A very fast implementation of the Sieve of Atkin is Dan Bernstein's primegen. This sieve is more efficient than the Sieve of Eratosthenes. His page has some benchmark information.

73
1/17/2009 6:49:04 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon