[PATCH] Improve generic rawmemchr

Ondřej Bílka neleai@seznam.cz
Thu Nov 24 09:29:00 GMT 2016


On Wed, Nov 16, 2016 at 06:53:03PM +0000, Wilco Dijkstra wrote:
> Improve generic rawmemchr for targets that don't have an
> assembler version by tailcalling memchr with the maximum size.
> If a target has an optimized memchr this is significantly faster
> (~3x on AArch64), if not, then this makes little difference.
> Also optimize the special case of zero to use strlen as this is
> typically faster than memchr.
> 
> ChangeLog:
> 2015-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 	* string/rawmemchr.c (RAWMEMCHR): Use faster memchr/strlen.
> --
> 
looks ok.



More information about the Libc-alpha mailing list