oscbyspro / Numberick

An arithmagick overhaul in Swift
Apache License 2.0
14 stars 3 forks source link

[NBKPrimeSieve] Sieve primes in a range #116

Open oscbyspro opened 9 months ago

oscbyspro commented 9 months ago

Given that you only need primes up to the square root of x to sieve x, there are faster ways of sieving a range than sieving every prime from zero through its upper bound. Like, you could jump straight to it once you have enough primes to sieve it.

oscbyspro commented 9 months ago

Hm. I'll skip this one for now. Inspiration is fleeting when you don't need it.