
21 Apr
2015
21 Apr
'15
6:35 p.m.
If you want to use bit fiddly mutable vector stuff to make the classic Sieve of Eratosthenes fast and compact, I think it makes a lot of sense to use the bitvec package instead of doing the bit fiddling by hand.
Indeed. However, the purpose of this code is to outperform the equally well optimised version in C and compiled with GCC or Clang. That's also the sole reason why I used TH to precompute a value that should never have been noticable in the first place. The code was written for GHC 7.6. More recent versions might no longer require TH to outperform GCC/Clang. Greets, Ertugrul