summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-04-07 16:57:04 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-04-07 18:26:01 -0700
commitb9b32074cecb0e0d20cf527eadacbb0b7f5cced9 (patch)
tree959e0dbb2e49f23b13b81d9efcca681ad6b4b341 /lisp/emacs-lisp
parent6382e1330814ca4df20eeccd8b4ef9ca17b997af (diff)
downloademacs-b9b32074cecb0e0d20cf527eadacbb0b7f5cced9.tar.gz
emacs-b9b32074cecb0e0d20cf527eadacbb0b7f5cced9.tar.bz2
emacs-b9b32074cecb0e0d20cf527eadacbb0b7f5cced9.zip
Improve inlining when compiling with -Og
* src/conf_post.h (EXTERN_INLINE) [!EMACS_EXTERN_INLINE]: Make it static inline, not merely static. This is a worthwhile performance improvement on my two platforms A and B (see below). On my platform A this change improves user+system CPU performance of ‘make compile-always’ by 52% on an -Og build, and by 1.4% on the default -O2 build. On my platform B this improves the same benchmark by 41% on an -Og build, and by -0.8% on the default -O2 build. That "-0.8%" is a small negative for this change, and I recall that it is why I didn't make this change earlier. However, Platform B uses an older GCC so we needn't worry overmuch about this small negative. With this change the performance advantage of -O2 over -Og has dropped on platform A; formerly -O2 was 87% faster than -Og, and now it is only 25% faster. On platform B the performance advantage of -O2 over -Og has dropped from being 62% faster to being 14% faster. Platform A is GCC 9.3.1 20200317 (Red Hat 9.3.1-1) on Fedora 31 x86-64 (AMD Phenom II X4 910e, circa 2010). Platform B is GCC (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 on Ubuntu 18.04.4 (Intel Xeon E3-1225 V2, circa 2012). This patch was inspired by a suggestion by Andrea Corallo in: https://lists.gnu.org/r/emacs-devel/2020-04/msg00263.html
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions