[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12541: Prefer plain 'static' to 'static inline'.
From: |
Eli Zaretskii |
Subject: |
bug#12541: Prefer plain 'static' to 'static inline'. |
Date: |
Sun, 30 Sep 2012 11:49:46 +0200 |
> Date: Sun, 30 Sep 2012 01:00:25 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> This one should be pretty self-explanatory.
>
> === modified file 'src/ChangeLog'
> --- src/ChangeLog 2012-09-30 07:26:32 +0000
> +++ src/ChangeLog 2012-09-30 07:57:28 +0000
> @@ -1,3 +1,98 @@
> +2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
> +
> + Prefer plain 'static' to 'static inline'.
> + With static functions, modern compilers inline pretty well by
> + themselves; advice from programmers often hurts as much as it helps.
> + On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
> + this change shrinks the text size of the Emacs executable by 1.7%
> + without affecting CPU significantly in my benchmark.
Since what version of GCC we can trust that static functions are
inlined?
The inline functions in bidi.c _must_ be inlined for performance
reasons. If the only way to make sure they are is to make them
external, then so be it.