Re: PATCH] Improve performance of memmem

Eric Blake <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On 12/19/18 9:26 AM, Wilco Dijkstra wrote:
> Hi,
> 
> Here is version 2 with improved comments and spaces:
> 
> This patch significantly improves performance of memmem using a novel
> modified Horspool algorithm.  Needles up to size 256 use a bad-character
> table indexed by hashed pairs of characters to quickly skip past mismatches.
> Long needles use a self-adapting filtering step to avoid comparing the whole
> needle repeatedly.

I've gone ahead and pushed this.  Thanks again for tackling this project.


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEY3OaSlgimHGqKqRv3g5py3orov0FAlwrjpkACgkQ3g5py3or
ov2cOQf/VHMap2qGhjfBNis3Its30ScaPgHQO5GEOis1JdAq6Ea5m05Q2qVy9mbi
mKHYQLOX2Wyt5CkBf/5GAhTKBKLtwLT+TUIGA9dtDtc+GSwodvXGMpBeAxt1BgRN
2PWhLcyWMxlXQhQ88x77GpUtC5P5f3Gf0X48y5ZuMamHTIDEeDnFWrgBtt+bUdcg
/FAje52Cqpqtepdtv6mHfcotZFML21xBYI2JTGCtBScVBo9Pv0hWlyM+7P8MJpd7
biRJ/pVtrupM3lrunjisacf7BrdEoaDglLrKp7LTWg42u9y4YbwX8VJRviVcQ9Pt
80TVrbbD7ye7UGhwpAw6XDHyPnCuBQ==
=MtT4
-----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.