4 ms·
That's not similar, at all. This is actually removing multiples, as in the sieve of erastosthenes.
by startling 10y ago
That's not similar, at all. This is actually removing multiples, as in the sieve of erastosthenes.
- rootlocus 10y agoIt's missing a loop, and the primes are hardcoded into the source code (see the similarity?). You might be mislead by the fact that you also find 'span:nth-child(4n+8)' or 'span:nth-child(6n+12)' (which aren't primes) but those are redundant, and an efficient sieve would skip non primes.