diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-01-22 11:47:45 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-03-25 10:18:44 +0000 |
commit | 2450a66001a3c0d1ad0d8f70bdac9fbc943bba11 (patch) | |
tree | 784aa60efff7783937adce4ea8bc5192691c4181 /src/3rdparty/easing | |
parent | aab749487f620e27b7311c729de3922e7fd09049 (diff) |
QDateTime: prevent aggressive inlining
The function getDateFromJulianDay() is simple arithmetic, but still
~400 bytes in executable size.
Yet GCC inlines this everywhere I looked, which makes some sense,
as different users of the class only use parts of the return
value and the optimizer has a field day removing all that dead
code.
However, that function has only one conditional, so presumably it
executes at full pipeline speed and it doesn't matter that it
calculates too much in some cases. More important is to use the
I-cache more conservatively.
That's what not inlining the function achieves.
The function returns its result in registers and doesn't spill
registers when called (at least on AMD64), so the effect on
runtime should be negligible.
Effects on Linux GCC 4.9 stripped release builds:
text -1536B
data +-0B
relocs +-0
Change-Id: Ia16838102d29ad67ee5efdc8b7b0a26f2f921df1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/3rdparty/easing')
0 files changed, 0 insertions, 0 deletions