optimize pyint to mpz conversion using hex