Subject: Re: [boost] [xint] Fourth release, requesting preliminary review again
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2010-06-10 14:20:33
>> It would probably also require some modifications to the lower
>> levels of the code, to disable all the pointer-swapping stuff that
>> I've built in for speed. That makes it difficult to experiment with
>> it at present. Once the library is finalized, we can play with it
>> and see if we can find a way around that problem.
> yes you are right
> i can see the rationale behind this now
> i guess the cost of allocation compared to cost of operations is
> negligible so in fact stack version will not gain much
> and it seems to me that i recalled the discussion about it
My experience with GMP has been that reusing existing GMP objects instead of declaring new ones was a significant performance enhancement. I don't think it is true that cost of operations is even greater than the cost of allocation, mush less significantly so, in general. It is reasonable, particularly with fixed integer, to expect that the common case will be operations on a number of bits only slightly larger than the built in integer types support. If I need 65 bits (and I do) I will code it myself rather than pay for an allocation (and I did).
It isn't clear to me what fixed integer provides if it allocates on the heap. Why would anyone use it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk