Improving while/do inside PrimeGenerator.generatePrimes -> findNextPrime()