Subject: Re: [boost] [range] Performance benchmarks?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2012-02-02 05:14:43
Den 02-02-2012 03:00, Dave Abrahams skrev:
> on Wed Feb 01 2012, Mathias Gaunard<mathias.gaunard-AT-ens-lyon.org> wrote:
>> They are in Boost, and in particular in Boost.Range, which was being
>> asked about here.
> I understand. Maybe Beman didn't know that Boost.Range ranges were
> iterator pairs. In the end,
> We're explicitly interested in what happens to efficiency when
> algorithms are /implemented/ using range primitives rather than by
> iterator increment, comparison, etc.
Well, the only way to answer that is by implementing Alexandrescu's
range abstractions and start comparing it with BoostRange. Not trivial
IMO. Then make sure that the underlyigng algorithms/loop-unrolling are
exactly the same. So basically, a huge (but very interesting) work.
An advantage of range primitives is whever we need to store a predicate
or functor; in Boost.Range, we need to store one in each iterator which
is not optimal (clever implementation of
transform_iterator/filter_iterator would optimize this away for empty
Again, I don't know what the speed difference will be between the two
ideas; If the data being processed is large, I guess storing an extra
function in the end iterator is of no significance.
The iterator-based range library also seem to work well with the
existing standard library;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk