GMP 6 the incomatible GMP?
davem at davemloft.net
Tue Jan 8 23:24:24 CET 2013
From: Torbjorn Granlund <tg at gmplib.org>
Date: Tue, 08 Jan 2013 12:50:01 +0100
> Marc Glisse <marc.glisse at inria.fr> writes:
> Then we might as well always put it in _mp_d[-1], no? IIRC that's what
> mpfr does.
> I see some problems with that:
> * There is a serial memory dependency problem, making the allocation
> check at least one more cache latency away. I don't think OoO
> execution will be able to hide that, as this is used.
I don't know how amicable you are to an idea like this, but if user
applications can only treat pointers to these objects as opaque then
you can encode information in the lowest bits of the pointer.
For example, you could encode in the lowest bit whether the _mp_d[-1]
thing is being done or not.
Then it's at worst a mis-predicted branch in the allocation check.
More information about the gmp-devel