Has there been historical work done to investigate small integer optimization?

marco.bodrato at tutanota.com marco.bodrato at tutanota.com
Mon Feb 12 12:18:38 CET 2024


12 feb 2024, 11:54 da Paul.Zimmermann at inria.fr:

> as Niels said, I fear the cost of the tests might make the benefit vanish.
> But to be sure, the only way is to try to implement this idea inside GMP,
> which involves quite some work.
But implementing it with the current mpz type is "impossible".
I mean, one should break the current interface.
Currently, _mp_d is always a pointer AND it always point to a readable limb. Even if _mp_alloc is zero.

To implement the idea inside GMP one should choose:
 - break current interface, or
 - fully implement a new layer (not mpn, mpz, mpf, but... mpZ?).


More information about the gmp-devel mailing list