Another performance question
Michel Bardiaux
mbardiaux at peaktime.be
Wed May 5 10:29:01 CEST 2004
Kevin Ryde wrote:
> Michel Bardiaux <mbardiaux at peaktime.be> writes:
>
>>What would be the impact,
>>risks, etc of having flags (1 in mpz, 2 in mpq) telling that a limb is
>>*not* a pointer but a number making by itself a 1-integer limb?
>
>
> I suppose that could work, though every function reading an mpz would
> need to check this flag and change the way it accesses the data.
I dont see why, only the allocation/deallocation would be impacted; data
access would still have a limb pointer and count.
>
> But we're probably inclined to leave this to an application. If
> you've got a lot of small numbers you probably don't even want to be
> making function calls to handle them, instead establish some fixnum
> versus bignum like various language interpreters do (lisps, smalltalk,
> etc).
Well, I tried that route, and my smalles common denominators overwhelmed
32-bits almost at once, and 64-bits after a few days of develeopment
work, which is why I went to GMP.
HaND,
--
Michel Bardiaux
Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
Tel : +32 2 790.29.41
More information about the gmp-discuss
mailing list