Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Nov 10, 2024
1 parent 5daa923 commit 609f1f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/ALGORITHMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand Down

0 comments on commit 609f1f0

Please sign in to comment.