You are viewing a single comment's thread. Return to all comments →
That will be slower. The extra isPrime() check is much slower then the 3 lines of code in the for loop in isPrime(). You can actually test out both versions and see the execution times in your submissions.