|
Boost : |
Subject: Re: [boost] [xint] Review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-03-10 10:20:26
On Thu, 10 Mar 2011 09:50:28 -0500
Jarrad Waterloo <jwaterloo_at_[hidden]> wrote:
> I do believe this library should be added to Boost provided the author
> is committed to supporting it and taking into consideration, at least,
> the comments raised by everyone's review.
Thank you for the review, and the comments.
> 1) What is your evaluation of the design?
> I like it. It mostly behaves like an ordinary integer. It is more than
> adequate for my needs. Potential enhancemnts which should not limit
> its adoption would include the following.
>
> 1.1) convenience functions for extracting sub integers ie. bit fields
Already on the list, from your earlier request.
> 1.2) convenience functions for creating masks
You mean bit-masks of a particular length, like mask(128) giving a
128-bit value with all bits turned on? I hadn't considered it, but that
could be useful for some things, even internally. I'd been using
((integer(1) << bits) - 1) for that purpose, but a custom function
would be more efficient. I'll put it on the list.
> 1.3) support for bitsets
> 1.4) support for dynamic bitsets ie. partial specialization
> vector<bool> from C++1x
Both already on the list.
> [...] I believe all of those suggestions are related. You should split
> your class back into two one dynamically allocated like a
> vector<int> and another which stack allocated like int or bitset.
> [Sorry, I know that at one time it was like this.] [...]
The planned design improvements should provide for that need.
> I do agree that all references to it being fast should be replaced
Already done.
> with a request for faster preferably assembly level patches.
On the list.
> It was lacking in examples of masks and bit fields which can be
> performed on regular integers but wasn't absolutely clear on this
> class of so many configuration options.
Apparently that's one of those "obvious only if you're already very
familiar with them" things. In any case, those are already on the list
from your earlier recommendation.
Again, thank you for the review.
-- Chad Nelson Oak Circle Software, Inc. * * *
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk