
On Wed, Nov 21, 2012 at 3:36 AM, Ben Coates <ben@blueskylabs.com> 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