Pollard's rho algorithm integer factorization algorithm benchmark with different functions