
21 Nov
2012
21 Nov
'12
8:36 a.m.
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?