This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Improve generic rawmemchr
- From: Ondřej Bílka <neleai at seznam dot cz>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Thu, 24 Nov 2016 10:29:23 +0100
- Subject: Re: [PATCH] Improve generic rawmemchr
- Authentication-results: sourceware.org; auth=none
- References: <AM5PR0802MB26102E302074A0DD238BE90383BE0@AM5PR0802MB2610.eurprd08.prod.outlook.com>
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.