Has there been historical work done to investigate small integer optimization?
Torbjörn Granlund
tg at gmplib.org
Mon Feb 12 12:28:24 CET 2024
marco.bodrato at tutanota.com writes:
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.
If we set alloc = 0 and size >= 2^30, then that means the the pointer
field is actually a numeric value, and perhaps the low 30 bits of the
size field is more bits for the numeric value. :-)
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-devel
mailing list