public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Ondřej Bílka" <neleai@seznam.cz>
To: Wilco Dijkstra <wdijkstr@arm.com>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH][AArch64] Optimized memcpy/memmove
Date: Wed, 30 Sep 2015 12:28:00 -0000	[thread overview]
Message-ID: <20150930122753.GA12909@domone> (raw)
In-Reply-To: <003701d0f9d0$fe013470$fa039d50$@com>

On Mon, Sep 28, 2015 at 10:35:20AM +0100, Wilco Dijkstra wrote:
> > I would here simply alias memcpy to memmove as there is minimal
> > performance impact when you do check only for sizes larger than 96
> > bytes.
> 
> That is an option indeed, however the entry check for memmove takes 1-2 cycles
> on most CPUs, and it means more executed branches and more I-cache footprint for 
> memcpy, so I'd have to be absolutely sure it doesn't slow down memcpy.
>
You should read more carefully what I wrote as I didn't asked for using
entry check. That check should be just before loop so it would affect
performance only for sizes larger than 96 bytes. On some processors this
could be free as OoO execution hides that cost, but you need to test
that. 

  reply	other threads:[~2015-09-30 12:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 13:16 Wilco Dijkstra
2015-09-27  8:44 ` Ondřej Bílka
2015-09-28  9:35   ` Wilco Dijkstra
2015-09-30 12:28     ` Ondřej Bílka [this message]
2015-09-30 14:37       ` Zack Weinberg
2015-10-05 10:30         ` Wilco Dijkstra
2015-12-15 16:40 Wilco Dijkstra
2016-04-15 12:43 ` Wilco Dijkstra
2016-05-12 14:01 ` Wilco Dijkstra
2016-05-12 15:40 ` Marcus Shawcroft
2016-05-12 16:25   ` Wilco Dijkstra
2016-05-19 11:33     ` Wilco Dijkstra
2016-06-10  7:06     ` Marcus Shawcroft

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=20150930122753.GA12909@domone \
    --to=neleai@seznam.cz \
    --cc=libc-alpha@sourceware.org \
    --cc=wdijkstr@arm.com \
    /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).