Niels Möller nisse at lysator.liu.se
Thu Sep 5 09:17:42 UTC 2019

tg at gmplib.org (Torbjörn Granlund) writes:

> The table generator program has now run.  Also pi1 wants the old code.
> The next question is how badly they want it.  :-)

For tuned *_METHOD values, it might be useful to let tuneup also add a
comment with next best method and margin, something like

#define HGCD2_METHOD 2 /* 3.2% faster than method 1 */

> Did you have a chance of playing with some code which takes care of
> small quotients without branches or division?

I did one variant with table lookup and an approximative quotient, which
implies that one needed conditional swaps depending on a < b. That
didn't beat plain division in my testing. But I also expect that we can
beat plain division on more machines.


Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.

More information about the gmp-devel mailing list