Boost logo

Boost :

From: nee Spangenberg (dsp_at_[hidden])
Date: 2004-01-09 03:15:39

Good morning, Hartmut!

Hartmut Kaiser schrieb:

> Hi all,
> during my current performance analysis sessions (to speed up Wave) I've
> stumbled over the fact, that the current iterator_adaptor implementation
> takes it's constructor parameter by value (the base iterator). Is there any
> reason, why this isn't a const reference (the base iterator parameter is
> then used to initialise the iterator_adaptor m_iterator member anyway)?
> Changing it this way would speed up things a bit, especially if the base
> iterator is not pointer based. Ok, I hear you say, please change your
> iterator implementation, but not always I have full control over this ...

One counter argument: I think, every algorithm of the standard library and
even the std:reverse_iterator c'tor takes iterator arguments per value. The
last example compares quite well to iterator_adaptor, doesn't it?

Happy New Year and Happy Hacking,


Boost list run by bdawes at, gregod at, cpdaniel at, john at