Prime decomposition: Difference between revisions
→Python: Using Croft Spiral sieve: make croft() another ~3% faster by moving the duplication out of the loop
(→Python: Using Croft Spiral sieve: make croft() another ~10% faster by calculating the candidates directly) |
(→Python: Using Croft Spiral sieve: make croft() another ~3% faster by moving the duplication out of the loop) |
||
Line 4,086:
p = roots[q]
del roots[q]
x = q + p2
while not_primeroot[x % 30] or x in roots:
x +=
roots[x] = p
else:
|