This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] aarch64: optimize the unaligned case of memcmp
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: "s dot pop at samsung dot com" <s dot pop at samsung dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 23 Jun 2017 12:29:21 +0000
- Subject: Re: [PATCH] aarch64: optimize the unaligned case of memcmp
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
This looks like a good improvement - I think unlike memchr we can read
up to the number of bytes specified, so no special page checks are needed.
Huge memcmp's are very rare, so like most string functions the small case
is more important than the large case. So I think you could just skip the complex
alignment code and get better results in real applications. Btw why do the max
alignment thing? - that's a lot of code for very little benefit...