[Bug libstdc++/66414] string::find ten times slower than strstr

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 27 13:47:52 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:a199da782fc165fd45f42a15cc9020994efd455d

commit r11-6931-ga199da782fc165fd45f42a15cc9020994efd455d
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Jan 27 13:21:52 2021 +0000

    libstdc++: Optimize std::string_view::find [PR 66414]

    This reuses the code from std::string::find, which was improved by
    r244225, but string_view was not changed to match.

    libstdc++-v3/ChangeLog:

            PR libstdc++/66414
            * include/bits/string_view.tcc
            (basic_string_view::find(const CharT*, size_type, size_type)):
            Optimize.


More information about the Gcc-bugs mailing list