Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-05-03 10:54:50


On 5/2/2010 10:28 PM, vicente.botet wrote:
> In addition no information must be stored on base integer that concerns fixed_integer. This is a bad design option, IMHO.

My "HO" also is that the memory management should be separated from the
arithmetic algorithms. Whether the integer is a fixed_integer or not is
compile-time information, so I don't think you should be keeping runtime
information to mirror that. It sounds like it was your intent for
base_integer to provide the implementation of the "core" arithmetic
algorithms. I would suggest moving the memory management up (or down,
depending on how you view things) to the derived classes. How feasible
is that? You can use CRTP to get access to the derived class's members.

This probably won't affect the interface or performance any, however, so
it's much more an implementation detail than COW. It's still bothering
me that you're finding moving to be so much slower than COW :/ We
should try to get to the bottom of this. I'll find some time today to
examine the code.

- Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk