strcasestr improvement proposal

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

strcasestr improvement proposal

lano1106
Hi,

I have removed the ANSI C standard violation where a pointer was decremented
in front of an array. As a bonus, it might have removed few pointer
operations per call depending of the input. I did these changes on top of
Jose Da Silva modifs that for some reasons have never been added to glibc.
(I have reviewed his changes and this is effectively an optimization). I
have not recompiled glibc but I have tested the changes outside the lib
successfully.

Greetings,
Olivier Langlois
http://www.streamtheworld.com


strcasestr_glibc_patch (4K) Download Attachment
tst-strcasestr.c (5K) Download Attachment