|
From: | Paul Eggert |
Subject: | Re: Using __builtin_expect (likely/unlikely macros) |
Date: | Sat, 20 Apr 2019 08:57:57 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
Andy Moreton wrote:
If the patches from this discussion on marking code as cold or liely/unlikely does not result in improved code generation and measureable performance gains, then they should be dropped as needless clutter in the source code.
As I mentioned in <https://lists.gnu.org/r/emacs-devel/2019-04/msg00767.html> the 'cold' changes that I installed into master improved overall performance on a largish practical benchmark (cd lisp && make compile-always) by 1.3% on my platform: Fedora 29, GCC 8.3.1 20190223 (Red Hat 8.3.1-2), AMD Phenom II X4 910e. The other changes proposed in this thread seem to not help performance (or even hurt it) and we have not installed them.
I like to see significant benefits for performance-related changes where the effects are not obvious. For improvements where the generated code is "obviously" faster (fewer and simpler instructions, say), I typically don't bother with measurements as my own time is limited too.
[Prev in Thread] | Current Thread | [Next in Thread] |