|
Boost : |
From: Michael Marcin (mmarcin_at_[hidden])
Date: 2007-06-20 18:11:09
Thorsten Ottosen wrote:
>
> To my surprise, I could not eliminate the overhead with vc8 (/Ox /Og).
> Thus the iterator wrapping seems to pay some penalty. This is quite
> strange IMO.
>
> Perhaps it is not optimal for iterator_adaptor to return base() by
> const&. Perhaps I'm doing something wrong. At any rate,
> I would have assumed iteration to be optimal.
>
> I'll have to use some more time on this ... but thanks for pointing
> out
> the problem.
>
The version I'm looking at is returning from base() by value but yes
returning by const reference also has no benefits (at least for RVCT).
If you're testing on vc8 make sure you've disabled the checked iterators
i.e. add _SECURE_SCL=0 to the preprocessor.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk