Tiny speedup for is_prob_prime