Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-06-20 17:42:36


Michael Marcin skrev:
> Thorsten Ottosen wrote:

>> I'll try to investigate this.
>>
>
> I appreciate it.
> If you have things you'd like me to try out I can compile them and send you
> the mixed assembly output.
>
> One thing I noticed is that it seems to fail to eliminate the return value
> copy of the void_ptr_iterator::base call. Accessing iter_ directly
> (unfortunately) produces much better code but still not the best.

I have tried playing a little with your example, eg. using operator[]
instead.

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.

-Thorsten


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