public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [AArch64] Optimized memcmp
Date: Thu, 29 Jun 2017 18:42:00 -0000	[thread overview]
Message-ID: <20170629184233.GZ6201@calimero.vinschen.de> (raw)
In-Reply-To: <AM5PR0802MB261024C52F84B3B42279AFF883D20@AM5PR0802MB2610.eurprd08.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

On Jun 29 14:32, Wilco Dijkstra wrote:
> This is an optimized memcmp for AArch64.  This is a complete rewrite
> using a different algorithm.  The previous version split into cases
> where both inputs were aligned, the inputs were mutually aligned and
> unaligned using a byte loop.  The new version combines all these cases,
> while small inputs of less than 8 bytes are handled separately.
> 
> This allows the main code to be sped up using unaligned loads since
> there are now at least 8 bytes to be compared.  After the first 8 bytes,
> align the first input.  This ensures each iteration does at most one
> unaligned access and mutually aligned inputs behave as aligned.
> After the main loop, process the last 8 bytes using unaligned accesses.
> 
> This improves performance of (mutually) aligned cases by 25% and 
> unaligned by >500% (yes >6 times faster) on large inputs.
> 
> ChangeLog:
> 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
> 
>         * newlib/libc/machine/aarch64/memcmp.S (memcmp): 
>         Rewrite of optimized memcmp.

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-06-29 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 14:32 Wilco Dijkstra
2017-06-29 18:42 ` Corinna Vinschen [this message]
2017-08-10 16:16 ` [AArch64] Optimized memcmp (cortex-strings) Wilco Dijkstra
2017-08-10 16:31   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170629184233.GZ6201@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).