Fast algorithm for finding prime numbers? [duplicate]
问题 This question already has answers here : Which is the fastest algorithm to find prime numbers? (14 answers) Closed 6 years ago . First of all - I checked a lot in this forum and I haven't found something fast enough . I try to make a function that returns me the prime numbers in a specified range. For example I did this function (in C#) using the sieve of Eratosthenes. I tried also Atkin's sieve but the Eratosthenes one runs faster (in my implementation): public static void SetPrimesSieve(int