Primes.jl icon indicating copy to clipboard operation
Primes.jl copied to clipboard

faster prime sieve part 1

Open oscardssmith opened this issue 2 years ago • 0 comments

Before _primesmask(2^30) took 2.726 seconds after it took 2.358s. Although this is a relatively small improvement overall, it removes ~100% of the time for the small primes (250ms vs 30ms) which means that this will continue to show large gains once we optimize the larger primes.

I've also separated sieving into it's own file since I expect the code will become more complex as we move to better sieves. @haampie since this is essentially part 1 of https://github.com/JuliaMath/Primes.jl/pull/87.

oscardssmith avatar Jun 13 '22 16:06 oscardssmith