Lazy mpz allocation
bodrato at mail.dm.unipi.it
Fri Apr 20 06:17:42 UTC 2018
Il Gio, 19 Aprile 2018 4:37 pm, Marc Glisse ha scritto:
> I finally pushed it. It seemed unsafe to keep mpq unaware of lazy
> allocation, in case people start swapping the numerator of a rational with
> a lazy 0 integer or something like that.
If we fear swaps, then ... what about swapping the deoniminator?
Should we support a code like:
mpz_swap (saved_denominator, mpq_denref(rational));
/* Code overwriting rational*/
If yes, a larger patch is needed, I attach a proposal.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4775 bytes
Desc: not available
More information about the gmp-devel