]> 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 15:40:20 +0000 (16:40 +0100)
commitceeba1d73c84f1a551677149ce3b3ed3372fb3ec
tree9ac8c4d916f9894e5b71f4f0f714200736792a91
parentc60bf879b21aefedaf632f585b9c39af8532bc71
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