$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [dynamic_bitset] expression template?
From: Ben Coates (ben_at_[hidden])
Date: 2012-11-21 03:36:53
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?