Concepts2
⚙️AlgorithmIntermediate
Bitset Optimization
Bitset optimization exploits word-level parallelism so one CPU instruction processes 64 bits at once on typical 64-bit machines.
#bitset#word-level parallelism#bitmask+12
∑MathIntermediate
Sieve of Eratosthenes
The Sieve of Eratosthenes marks multiples of each prime to find all primes up to n in O(n log log n) time.
#sieve of eratosthenes#segmented sieve#linear sieve+11