[PATCH][AArch64] Add rawmemchr

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu May 19 11:27:00 GMT 2016


ping

________________________________________
From: Wilco Dijkstra
Sent: 12 May 2016 17:16
To: Marcus Shawcroft
Cc: newlib@sourceware.org; nd
Subject: Re: [PATCH][AArch64] Add rawmemchr

Marcus Shawcroft wrote:
> This patch appears to have been munged by the mail system, can you
> repost as an attachment please.

Sure, I've attached the patch.

Wilco

Add a simple rawmemchr implementation. Use strlen for rawmemchr(s, '\0') as it is the
fastest way to search for '\0', and use memchr with an infinite size for other cases.
This is 3x faster for large sizes.

ChangeLog:
2016-04-22  Wilco Dijkstra  <wdijkstr@arm.com>

        * newlib/libc/machine/aarch64/Makefile.in: Add rawmemchr.S and
        rawmemchr-stub.c.
        * newlib/libc/machine/aarch64/Makefile.am: Likewise.
        * newlib/libc/machine/aarch64/rawmemchr.S (rawmemchr): Add rawmemchr.
        * newlib/libc/machine/aarch64/rawmemchr-stub.c (rawmemchr): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rawmemchr_newlib.patch
Type: text/x-patch
Size: 8204 bytes
Desc: rawmemchr_newlib.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20160519/9a81a68f/attachment.bin>


More information about the Newlib mailing list