diff --git a/doc/ALGORITHMS.md b/doc/ALGORITHMS.md index 065fe63d..05cb3324 100644 --- a/doc/ALGORITHMS.md +++ b/doc/ALGORITHMS.md @@ -72,7 +72,7 @@ efficiently uses the CPU's multi level cache hierarchy. ### Optimizations used in primesieve * Uses a bit array with 8 flags each 30 numbers for sieving - * Pre-sieves multiples of small primes <= 163 + * Pre-sieves multiples of small primes ≤ 163 * Compresses the sieving primes in order to improve cache efficiency [[5]](#references) * Starts crossing off multiples at the square * Uses a modulo 210 wheel that skips multiples of 2, 3, 5 and 7 diff --git a/src/README.md b/src/README.md index f6139e5c..83143a01 100644 --- a/src/README.md +++ b/src/README.md @@ -52,9 +52,9 @@ buckets and only when there are no more buckets in the stock the MemoryPool will allocate new buckets. -* **PreSieve** is used to pre-sieve multiples of small primes <= 163 to speed +* **PreSieve** is used to pre-sieve multiples of small primes ≤ 163 to speed up the sieve of Eratosthenes. The ```PreSieveTables.hpp``` header contains - 16 static lookup tables which have been sieved using the primes <= 163. The + 16 static lookup tables which have been sieved using the primes ≤ 163. The total size of all pre-sieve lookup tables is about 123 kilobytes. Whilst sieving, we perform a bitwise AND of the pre-sieve lookup tables and store the result in the sieve array. Pre-sieving provides a speedup of up to 30%