From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: Optimize glyph row clearing and copying routines
Date: Tue, 24 Sep 2013 14:50:40 +0300 [thread overview]
Message-ID: <837ge6igkv.fsf@gnu.org> (raw)
In-Reply-To: <524164FF.10407@yandex.ru>
> Date: Tue, 24 Sep 2013 14:10:07 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> CC: emacs-devel@gnu.org
>
> On 09/24/2013 10:35 AM, Eli Zaretskii wrote:
>
> > Does this change really speed up the code?
>
> YMMV, as usual with benchmarks. Time is in CPU cycles, smaller is better:
>
> It was:
>
> gcc 4.8.1 gcc 4.8.1 Intel C 13.1.3 clang 3.3
> -O2 -g3 -O3 -march=native -O3 -xHOST -O3 -march=native
> ------------------------------------------------------------------------------------------
> clear_glyph_row 100 140 90 40
> copy_row_except_pointers 90 160 80 100
>
>
> Now it is:
>
> gcc 4.8.1 gcc 4.8.1 Intel C 13.1.3 clang 3.3
> -O2 -g3 -O3 -march=native -O3 -xHOST -O3 -march=native
> ------------------------------------------------------------------------------------------
> clear_glyph_row 75 60 35 35
> copy_row_except_pointers 95 150 50 70
>
> (Intel C and clang makes heavy use of SSE, but gcc isn't).
>
> It would be interesting to add MSVC to this table :-).
>
> In short, I believe that a good compiler should get more optimization opportunities from
> new code rather than from old. For this particular case, Intel C is "definitely good",
> and gcc, hm...looks controversial at least.
I think -O3 is not interesting in this case. For -O2 with GCC, which
is the most important case (as Emacs is normally built like that), you
get net loss, because AFAIR copy_row_except_pointers is called much
more often than clear_glyph_row. The important comparison is, of
course, as part of some redisplay scenario, not just cycle comparison.
next prev parent reply other threads:[~2013-09-24 11:50 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 [this message]
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
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=837ge6igkv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dmantipov@yandex.ru \
--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.