all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Yates <john@yates-sheets.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Dmitry Antipov <dmantipov@yandex.ru>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: Optimize glyph row clearing and copying routines
Date: Tue, 24 Sep 2013 13:28:02 -0400	[thread overview]
Message-ID: <CAJnXXohunf8qVj80rLXrViXUWuyzUiygmQHqzU6CY8sVM826Bg@mail.gmail.com> (raw)
In-Reply-To: <83wqm6gnhv.fsf@gnu.org>

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

Got it.  I jumped to a conclusion based on too little evidence.

/john


On Tue, Sep 24, 2013 at 1:04 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Tue, 24 Sep 2013 09:40:53 -0400
> > From: John Yates <john@yates-sheets.org>
> > Cc: Dmitry Antipov <dmantipov@yandex.ru>, Emacs developers <
> emacs-devel@gnu.org>
> >
> > It is true that the standard's definition of memcpy is in terms of
> copying
> > a sequence of bytes.  It is also true that memcpy is one of the most
> > important and most heavily optimized library functions.
> >
> > These days any credible compiler has a means of determining that an
> > invocation of a function named 'memcpy' is actually an invocation of the
> > standard's memcpy.  E.g. gcc's exposed memcpy is an inline whose body
> > simply calls __builtin_memcpy.
>
> That's not the issue here.  Because this:
>
>   struct foo *foo, *bar;
>   ...
>   *foo = *bar;
>
> (which was the old code) is also implemented with a memcpy, whether
> builtin or not.
>
> The issue here is a _partial_ copy of a struct, starting with some
> offset.  That offset can be aligned less favorably than the struct
> itself, which will cause memcpy be less efficient.
>
> The old code copied the entire struct, and then "fixed" a small number
> of members that cannot be copied.
>
>

[-- Attachment #2: Type: text/html, Size: 1911 bytes --]

  reply	other threads:[~2013-09-24 17:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24  6:35 Optimize glyph row clearing and copying routines Eli Zaretskii
2013-09-24 10:10 ` Dmitry Antipov
2013-09-24 11:50   ` Eli Zaretskii
2013-09-24 12:42     ` Dmitry Antipov
2013-09-24 13:40 ` John Yates
2013-09-24 17:04   ` Eli Zaretskii
2013-09-24 17:28     ` John Yates [this message]
2013-09-24 18:03     ` Paul Eggert
2013-09-24 18:32       ` Eli Zaretskii
2013-09-26 12:35         ` Juanma Barranquero

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=CAJnXXohunf8qVj80rLXrViXUWuyzUiygmQHqzU6CY8sVM826Bg@mail.gmail.com \
    --to=john@yates-sheets.org \
    --cc=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.