unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Optimize glyph row clearing and copying routines
Date: Tue, 24 Sep 2013 14:10:07 +0400	[thread overview]
Message-ID: <524164FF.10407@yandex.ru> (raw)
In-Reply-To: <83a9j2iv6o.fsf@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.

Dmitry




  reply	other threads:[~2013-09-24 10:10 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=524164FF.10407@yandex.ru \
    --to=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 public inbox

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

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).