Find primes fast: sieve of Eratosthenes and beyond
sieves, trial division
6 steps · about 1 h 3 min · Intermediate
- Sieve of Eratosthenes (video, Khan Academy Labs, 4 min)
The sieve drawn out, from Khan's cryptography series.
- Finding Primes in Python with the Sieve of Eratosthenes (video, mCoding, 7 min)
Writes it and makes it faster step by step.
- Sieve of Eratosthenes (article, cp-algorithms, 15 min)
The standard reference: complexity, odd-only and segmented sieves, code.
- Software Drag Racing: C++ vs C# vs Python (video, Dave's Garage, 24 min)
The same prime sieve raced in three languages, and why speed differs.
- PlummersSoftwareLLC/Primes (repo, Dave Plummer + community, 8 min)
That sieve in dozens of languages, with benchmarks.
- kimwalisch/primesieve (repo, Kim Walisch, 5 min)
One of the fastest real-world sieves; read the README's "how it works".