I was vagely aware of that mpz_powm_ui is slower than mpz_powm for most exponent sizes, I just never got around to fixing it. I added some text and a diagram to http://gmplib.org/devel/ about these anomalies, so that it is not forgotten. -- Torbjörn