summaryrefslogtreecommitdiff
path: root/string/str-two-way.h
AgeCommit message (Collapse)Author
2018-07-16Improve strstr performanceWilco Dijkstra
Improve strstr performance. Strstr tends to be slow because it uses many calls to memchr and a slow byte loop to scan for the next match. Performance is significantly improved by using strnlen on larger blocks and using strchr to search for the next matching character. strcasestr can also use strnlen to scan ahead, and memmem can use memchr to check for the next match. On the GLIBC bench tests the performance gains on Cortex-A72 are: strstr: +25% strcasestr: +4.3% memmem: +18% On a 256KB dataset strstr performance improves by 67%, strcasestr by 47%. Reviewd-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
2016-01-04Update copyright dates with scripts/update-copyrights.Joseph Myers
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-02-12Fix typo, improve comment, remove superfluous #undefs, add missing #undef.Tom de Vries
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-10-15Fix BZ #14716: memmem crashMaxim Kuvyrkov
2012-10-08Fix BZ #14602: strstr and strcasestr return wrong result.Maxim Kuvyrkov
2012-08-21Micro-optimize critical path of strstr, strcase and memmem.Maxim Kuvyrkov
2012-08-21Use pointers for traversing arrays in strstr, strcasestr and memmem.Maxim Kuvyrkov
2012-08-21Detect EOL on-the-fly in strstr, strcasestr and memmem.Maxim Kuvyrkov
2012-08-21Optimize first-character loop of strstr, strcasestr and memmem.Maxim Kuvyrkov
2012-08-15Remove local redefinition of MAX macro.Roland McGrath
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert
2010-10-06Fix strstr and memmem algorithm.Eric Blake
2010-07-23Add performance tests for strstr and strcasestr.Ulrich Drepper
2008-05-15* string/Makefile (distribute): Add str-two-way.h.cvs/fedora-glibc-20080515T0735Ulrich Drepper
2008-03-29 Eric Blake <ebb9@byu.net> Rewrite string searches to O(n) rather than O(n^2). * string/str-two-way.h: New file. For linear fixed-allocation string searching. * string/memmem.c: New implementation. * string/strstr.c: New implementation. * string/strcasestr.c: New implementation. * sysdeps/posix/getaddrinfo.c (getaddrinfo): Call _res_hconf_init