isPrime() function/algo optimization:
insted of taking all integers from 2 to K, take only odds since we know that the even prime is 2. This should in theory reduce the time to check primilaty to half.
This commit is contained in:
parent
1954308cb4
commit
db2a852cf3
Loading…
Reference in New Issue
Block a user