[PATCH] Improve strstr performance of short needles

Corinna Vinschen vinschen@redhat.com
Wed Sep 5 10:22:00 GMT 2018


On Sep  4 17:54, Wilco Dijkstra wrote:
> Improve strstr performance for the common case of short needles.  For a single
> character strchr is best, for 2-4 characters a small loop is fastest.  For these
> the speedup over the Two-Way algorithm is ~10 times on large strings.
> 
> Newlib builds, the new code passes GLIBC testsuite. OK for commit?

Pushed with a small tweak.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20180905/6c5ae319/attachment.sig>


More information about the Newlib mailing list