Boost logo

Boost :

Subject: [boost] [range] Performance benchmarks?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2012-02-01 10:39:51


A question came up in a long bikeshed discussion on a C++ committee
mailing list as to the performance of range based interface versus a
begin/end iterator interface (I.E. traditional STL interface) to the
same algorithms. Out of curiosity, I checked the Boost.Range docs, but
didn't see any performance measurements.

It might encourage potential users to take the leap if the Boost.Range
"Introduction" page made some mention of performance implications for
use of the Boost library.

The intro gives a "Push the even values from a map in reverse order
into the container target" example:

     // Assume that is_even is a predicate that has been implemented
elsewhere...
     push_back(target, my_map | map_values | filtered(is_even()) | reversed);

Are there any benchmarks available for this? What does the straight
STL version of the code look like?

--Beman


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