On Tue, 8 Jan 2013, Niels Möller wrote:

Torbjorn Granlund <t...@gmplib.org> writes:

The idea is to instead make a 64-bit bitfield of the _mp_size and
_mp_alloc fields.  One would give _mp_size about 48 bits, and _mp_alloc
the remaining 16.  The alloc field would lose granularity, but should
code small sizes exactly.

Hmm. I guess one could go down to only 8 bits or so for the alloc field,
and for larger allocations, store the number of allocated limbs at the
head of the limb array (in the case limb size is not artificially small,
it could be just _mp_d[-1]).

Then we might as well always put it in _mp_d[-1], no? IIRC that's what mpfr does.

--
Marc Glisse
_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
http://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to