6 ms·> first snippet has quadratic performance Not if primes is a set.by allenz 8y ago> first snippet has quadratic performance Not if primes is a set.