Sort m's by size for performance
Use mpz_swap