]> git.ipfire.org Git - thirdparty/glibc.git/commit
Speedup first memmem match
authorRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Tue, 28 Aug 2018 07:12:19 +0000 (12:42 +0530)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 13 Sep 2019 14:48:19 +0000 (15:48 +0100)
commitecd6271ed80e71b3b1f286e2977f534d54c33af4
treeefc16baedc0d5d33d9792b0b1702521de9a854c6
parentbba6b9288f5192b67947e478ef9033920d22216a
Speedup first memmem match

As done in commit 284f42bc778e487dfd5dff5c01959f93b9e0c4f5, memcmp
can be used after memchr to avoid the initialization overhead of the
two-way algorithm for the first match.  This has shown improvement
>40% for first match.

(cherry picked from commit c8dd67e7c958de04c3783cbea7c384431707b5f8)
ChangeLog
string/memmem.c