B^(2j) = (B^j)^2 (i.e., even values of i) B^(2j+1) = (B^(2j))*B (i.e., odd values of i)
I pushed a set of changes implementing this: https://gmplib.org/repo/gmp/raw-rev/186ea964d61f https://gmplib.org/repo/gmp/raw-rev/a6967ea18b2f https://gmplib.org/repo/gmp/raw-rev/289ab13bc3fe https://gmplib.org/repo/gmp/raw-rev/cd4716561151 (The first two are cleanups, the latter two implement the actual change.) I haven't benchmarked this change, but it is clearly never a slowdown. -- Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel