Speed up prime checks/factorization.