Skip to main content

sieve_of_eratosthenes

Function sieve_of_eratosthenes 

Source
pub fn sieve_of_eratosthenes(n: u64) -> Vec<u64>
Expand description

All primes ≤ n by the sieve of Eratosthenes over odd numbers only (n/16 bytes of work space as a bit set), in O(n log log n) time.