Added boolean is_prime to for loop. Five-fold performance increase.