Re: [PATCH] Improve strstr performance of short needles

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAluPkzIACgkQ9TYGna5E
T6BMPQ//XL40Ojm2fbLJc5WzqFKyBsR81BsYKjYksKZZC/wymtNWHfkIQCFgDfqK
C71GLWmkebkRXtgk9iy6SQ7SGYcvLYS+echFIlFVm533BK56AfKw8FI+pa+SWYHG
ijurZmAwJK9UZ05Ilba3v46dLowJ0XdAh9ILke0v6ai+dy/H0RwN8I7VoxIkzGsw
zDAHkkPL6Yf+1ozWwP5Sr4vPkZtni1LGBAGkT8U/HbWxacaOHSxtDdJ/mQyWnnVG
aZ17vf9svMvvlvOi5XTSV6rSaj4LAri9TnveuZlsJ2/fRiz9SMZYHxCS4DM8SPyQ
n3g1SDs+h0VuLVXePufwHXw8s2rRnI7Ar6mThLEwnLX930OE+8eo/PQFwnB8GGPn
h5Ig2iE3aWWqo72m/XwxHSCOyIh7E8H4s4D6oYP+I1alTYZ3CPHVRMCeQ0mx0CiB
+sHTgBfybbEvJoRRQvgv+MNhBiSS39ExKc1UgRFrVovYHFRh3B8/H0EorrPuVwFy
evGTtPatUsewLemsRTPD5wrHccd8y0pyOqDiEhY2J/02o862ykUIDTKOCVQ76CjF
7zDO5gFCyWgFzKaurj2N6Jb7UFK4jGSrVtLyFNw7hEwO9WgmE2SvzqiPpQZGA/Oh
ti0zJkTqyj5RUXcfPYDFeTjmCxciNeORt21apkvvZJTJ3itzW7c=
=3ewS
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.