[Bug libstdc++/58358] [4.7/4.8/4.9 Regression] search_n has a Complexity violation for random access iterator

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Tue Sep 10 16:41:00 GMT 2013


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

--- Comment #23 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Thanks a lot Chris. Sorry if I bother you for a few minutes more: when you say
"doing away with skipping optimizations altogether", you mean, essentially,
using the algorithm we have got now for forward iterators? Which is also, if I
remember correctly, what we had earlier for random access iterators too? 

In that case, I'm really unsure: I'm tempted by what Mitsuru is proposing, but
I'm not 100% sure, not because of the 10% difference, but more importantly
because we know well what we have got, nobody complained for so many years, and
your change would be only a small tweak of it. Also, I know you are around to
maintain it, which isn't a minor detail! In case, would you be willing to
maintain Mitsuru's code too? Eventually, I think I will send both patches to
the mailing list with my personal opinion, and I will ask.



More information about the Gcc-bugs mailing list