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.
Before
_primesmask(2^30)
took 2.726 seconds after it took2.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.