emacs-devel
[Top][All Lists]
Advanced

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

Re: Inlining policy


From: Paul Eggert
Subject: Re: Inlining policy
Date: Tue, 7 Apr 2020 21:03:08 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 4/5/20 3:23 AM, Andrea Corallo wrote:
what about having a new macro to control the key operations we want to
always have inlined at -O0 and -Og instead of falling back into defining
these as macros?

I looked into this some more, and found some problems with using __attribute__((always_inline)), such as GCC complaining that it can't inline some functions in some cases on some platforms. It was a pain to suss out what would improve performance while avoiding the warnings, and while fiddling with this a bit I found a simpler change that had even better performance than __attribute__((always_inline)) did, at least on one platform for my standard benchmark of 'make compile-always'. So I installed the two attached patches instead. Together they improve Emacs CPU performance for 'gcc -Og' by about 60% on my benchmark.

I kept the DEFINE_KEY_OPS_AS_MACROS stuff because of the -O0 performance issues that we discussed earlier. Once we no longer need to worry about -O0 performance when debugging, we can get rid of that stuff.

Thanks for suggesting inlining as a way to improve Emacs performance when compiled with -Og.

Attachment: 0001-Improve-inlining-when-compiling-with-Og.patch
Description: Text Data

Attachment: 0002-Revert-my-KEY_OPS_CFLAGS-change-to-src-Makefile.in.patch
Description: Text Data


reply via email to

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