[PATCH] Optimize strstr, strcasestr and memmem

Maxim Kuvyrkov maxim@codesourcery.com
Wed May 30 09:11:00 GMT 2012


On 28/05/2012, at 6:53 AM, Joseph S. Myers wrote:

> There is an open bug (bug 11607) specifically about strstr slowing down 
> (in particular cases) when the worst-case-linear implementation was 
> introduced.  So the test in that bug may be useful for benchmarking the 
> patch (and if it appears to fix the regression then it will be appropriate 
> to list [BZ #11607] in the ChangeLog entry, etc.).

Joseph, thanks for the pointer.  This bug hits the short-needle case that I focused on in this patch submission.  The patches cut testcase's runtime by 3-5 times, depending on multilib (-m32/-m64).

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics




More information about the Libc-alpha mailing list