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.
More Related Contents:
- Determining if a number is prime
- Printing prime numbers from 1 through 100
- Fastest algorithm for primality test [closed]
- Insertion sort stops working after million input
- How to find out how many bits are set (equal 1) in the product of two integers [closed]
- C++ – Find numbers between first and last negative numbers in Array
- Program stopped working, when tried to run
- C++ throwing exception in recursive algorithm
- How to use Quick Sort to sort an array of strings
- How to get the maximum number after erasing n digits from the number [closed]
- Calculating pow(a,b) mod n
- How to find which elements are in the bag, using Knapsack Algorithm [and not only the bag’s value]?
- Lock-free Progress Guarantees in a circular buffer queue
- Getting the actual length of a UTF-8 encoded std::string?
- Emulate “double” using 2 “float”s
- Algorithm for finding the smallest power of two that’s greater or equal to a given value [duplicate]
- How can I find the actual path found by BFS?
- Need for predictable random generator
- Splitting a string by a character
- How can I sort a std::map first by value, then by key?
- what is the difference between set and unordered_set in C++?
- Similar String algorithm
- Calculating the Amount of Combinations
- Better shading on BW display while rendering filled surfaces
- How can I sort an STL map by value?
- Algorithm to add or subtract days from a date?
- Creating N nested for-loops
- How to find Longest Common Substring using C++
- Mapping elements in 2D upper triangle and lower triangle to linear structure
- Generate N random numbers within a range with a constant sum