|
Boost : |
Subject: Re: [boost] [range] fat iterators?
From: Eric Niebler (eniebler_at_[hidden])
Date: 2013-11-07 16:33:41
On 11/7/2013 8:29 PM, Thorsten Ottosen wrote:
> Remark on your article: did you benchmark your new design in terms of
> speed and size?
I did the size benchmark. Boost's istream_range<string>, which is a pair
of std::istream_iterators, is 24 bytes, and the iterators are 12. My
istream_range is 8 bytes, and the iterator is 4. That's with libstdc++
4.7. The differences can be larger on a platform that uses the
small-string optimization.
I didn't measure performance, I admit. Non-locality is a valid concern.
I have no doubt that it's possible to construct cases where one
implementation is faster than the other. Lies, damn lies, and
benchmarks, you know.
-- Eric Niebler Boost.org http://www.boost.org
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk