This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/66414] Regression: string::find ten times slower than strstr
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Dec 2016 10:41:16 +0000
- Subject: [Bug libstdc++/66414] Regression: string::find ten times slower than strstr
- Auto-submitted: auto-generated
- References: <bug-66414-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-12-05
Ever confirmed|0 |1
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think we can simply hoist the code out into a helper function and then
overload that for the common char_traits<char> and char_traits<wchar_t> cases,
where we know the char_traits doesn't do anything funky and we can forward to
optimized libc calls. The generic version can't do that.