Boost logo

Boost :

Subject: Re: [boost] [dynamic_bitset] expression template?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2012-11-21 09:08:49


On Wed, Nov 21, 2012 at 3:36 AM, Ben Coates <ben_at_[hidden]> wrote:
> dynamic_bitset currently allocates temporary vectors for most
> operations, and all the allocating and deallocating can easily
> dominate the running time for a program that makes heavy use of them.
> You can work around some of it with careful use of named temporaries
> around loops but some operations like intersection of 3 sets ( (a & b
> & c).any() ) result in a lot of unwanted copies and allocations.
>
> I've had good results converting it to use expression templates for
> intermediary operations, with the outcome of being able to do
> arbitrary non-resizing operations without allocating. Is there any
> interest in changing the boost version to do this?

Yes, but...

Does the interface change? If so, How?

--Beman


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