emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimize glyph row clearing and copying routines


From: Dmitry Antipov
Subject: Re: Optimize glyph row clearing and copying routines
Date: Tue, 24 Sep 2013 14:10:07 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]