[commit: ghc] master: Mark *FB functions INLINE[0] (Fixes #13001) (09bce7a)
git at git.haskell.org
git at git.haskell.org
Tue Jan 10 20:28:14 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/09bce7accd330e99b1667f8b4eda7def722d6f0c/ghc
>---------------------------------------------------------------
commit 09bce7accd330e99b1667f8b4eda7def722d6f0c
Author: Takano Akio <tak at anoak.io>
Date: Tue Jan 10 14:36:00 2017 -0500
Mark *FB functions INLINE[0] (Fixes #13001)
When fusion rules successfully fire, we are left with calls to
*FB functions. They are higher-order functions, and therefore they
often benefit from inlining. This is particularly important when
then final consumer is a strict fold (foldl', length, etc.), because
not inlining these functions means allocating a function closure
for each element in the list, which often is more costly than what
fusion eliminates.
Nofib shows a slight increase in the binary size:
------------------------------------------------------------------------
Program Size Allocs Runtime Elapsed TotalMem
------------------------------------------------------------------------
gen_regexps -0.3% 0.0% 0.000 0.000 0.0%
puzzle +0.8% 0.0% 0.089 0.090 0.0%
reptile +0.8% -0.0% 0.008 0.008 0.0%
------------------------------------------------------------------------
Min -0.3% -0.0% -7.3% -7.1% 0.0%
Max +0.8% +0.0% +7.8% +7.7% +1.8%
Geometric Mean +0.0% -0.0% +0.2% +0.2% +0.0%
------------------------------------------------------------------------
Reviewers: simonpj, austin, hvr, bgamari
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2951
GHC Trac Issues: #13001
>---------------------------------------------------------------
09bce7accd330e99b1667f8b4eda7def722d6f0c
libraries/base/Data/Maybe.hs | 2 +-
libraries/base/Data/OldList.hs | 2 +-
libraries/base/GHC/Base.hs | 2 +-
libraries/base/GHC/Enum.hs | 27 ++++++++++-------
libraries/base/GHC/Exts.hs | 1 +
libraries/base/GHC/List.hs | 42 ++++++++++++++++++++-------
testsuite/tests/perf/should_run/T13001.hs | 7 +++++
testsuite/tests/perf/should_run/T13001.stdout | 1 +
testsuite/tests/perf/should_run/all.T | 8 +++++
9 files changed, 69 insertions(+), 23 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 09bce7accd330e99b1667f8b4eda7def722d6f0c
More information about the ghc-commits
mailing list