http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58358

--- Comment #14 from Chris Jefferson <chris at bubblescope dot net> ---
(In reply to Marc Glisse from comment #12)
> Chris, did you consider applying this optimized code to bidirectional
> iterators and not just random access iterators? We may end up doing a few
> more ++/-- than necessary, but not by more than a factor 2 I believe, and we
> would often save many calls to the predicate. Something may also be doable
> for forward iterators, but that's more complicated for less gain and
> couldn't share the same code.

I considered this, but as you say this would slow things down in some cases,
and I've found bugs which cause slowdowns in any situation tend to have serious
problems getting accepted.

Reply via email to