mpn_mul is embarrassingly slow

Torbjörn Granlund tg at
Wed Apr 25 09:22:37 UTC 2018

"Marco Bodrato" <bodrato at> writes:

  Changes between GMP version 4.3.X and 5.0.0
    * New mpn functions: mpn_sqr, mpn_and_n, mpn_ior_n, mpn_xor_n, mpn_nand_n,
    * The mpn_mul function should no longer be used for squaring,
      instead use the new mpn_sqr.

Great, I suppose we can make mpn_mul slow for squaring now, but make
sure we list that in the release announcements.

(We need to stop calling mpn_mul unconditionally ourselves in a few
places at the same time.)

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list