WIP Atkin sieve
Closes #157
It is already competitive with the existing sieve and is 10 times simpler, but I need to merge more performance patches into https://github.com/Bodigrim/bitvec to make this code really shine.
This is more or less ready per se. But unfortunately prime counting is so intimately (and impenetrably) connected to the existing Eratosthenes sieve, that I cannot decomission the latter. That said, this PR is on hold until I disentangle this knot.
Hey @Bodigrim,
unfortunately prime counting is so intimately (and impenetrably) connected to the existing Eratosthenes sieve, that I cannot decomission the latter.
I understand that merging this as is without removing the earlier sieve code would just clutter the codebase (even further), but if it's already working with good performance, wouldn't merging it now and making a new PR that proceeds with decoupling the Math.NumberTheory.Primes.Counting API from Math.NumberTheory.Primes.Sieve.Eratosthenes also work?
My main goal here is to make source code more maintainable. I can even agree to worsen performance mildly.
It might happen that I'd never untangle Math.NumberTheory.Primes.Counting. Having two implementations of sieves side-by-side is not something future maintainers would be thankful for ;)
@Bodigrim can't say I don't understand. It's already difficult enough maintaining the package as it is - I remember trying to migrate from array to vector, that was challenging.