Lazy mpz allocation
Torbjörn Granlund
tg at gmplib.org
Wed May 4 06:43:45 UTC 2016
Marc Glisse <marc.glisse at inria.fr> writes:
For mpq, the attached seems sufficient to pass make check. Of course,
without a copy-on-write mechanism for the 1 in the denominator, the
gains are not comparable to the mpz case, it is more for consistency.
I forgot about that we need to have an explicit denominator.
We could surely point that to some static read-only data, but that would
of course incur a cost when "re-allocating".
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-devel
mailing list