Skip to content

primesieve-7.8

Compare
Choose a tag to compare
@kimwalisch kimwalisch released this 29 Jan 08:59
· 541 commits to master since this release

This is a new minor release, the API and ABI of libprimesieve are backwards compatible.

The primesieve command-line program runs up to 10% faster due to improved pre-sieving and libprimesieve's primesieve::iterator runs up to 15% faster due to improved pre-sieving, reduced branch mispredictions and increased instruction level parallelism. primesieve now pre-sieves the multiples of small primes < 100 (previously ≤ 19) using only half as much memory as before. Instead of using a single large pre-sieved buffer primesieve now uses 8 smaller pre-sieved buffers which are bitwise AND together before being copied into the sieve array. Thanks to @zielaj for this amazing work!

ChangeLog

  • PreSieve.cpp: Add multiple pre-sieve buffers #110.
  • PrimeGenerator.cpp: Reduce branch mispredictions #109.
  • PrimeGenerator.cpp: Add AVX512 algorithm #109.
  • iterator.cpp: Avoid default initialization of primes vector.
  • iterator-c.cpp: Avoid default initialization of primes vector.
  • ParallelSieve.cpp: Initialize PreSieve.
  • ALGORITHMS.md: Update documentation.