Boost logo

Boost :

Subject: Re: [boost] [xint] quick review
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-03-25 07:41:50


On 25 March 2011 10:56, Daniel James <dnljms_at_[hidden]> wrote:

> Personally, I'd just supply two different classes and overload the
> appropriate functions rather than implementing a complicated generic
> version.

The reason I would not do this is because in practice it'll mean yet another
incompatible interface, because there will be no requirement to keep two
separate libraries in sync.

There is a definite need for the fixed but larger than the machine word of
my current machine type. If it is part of the implementation of a Boost
extended integer library, it remains interface compatible. Plus, it can be
a performance win because no dynamic allocation is required, with another
win when the fixed size matches the size of a machine word.

With only a dynamically sized integer, people who want larger fixed size
integers will of course use it if they don't have performance needs (since
it is usually easier to adapt something which doesn't quite meet your needs
than to implement something from scratch), and may or may not migrate with
much pain to some different fixed integer library should it appear in the
future. I'd rather we eliminate that potential pain, with the secondary
benefit being a performance win.

I really do believe that fixed sized integers should be a part of this
library.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

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