diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2020-05-26 19:29:10 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-30 06:08:43 -0400 |
commit | 7c555b054bf074a9ab612f9d93e3475bfb8c6594 (patch) | |
tree | ac4baf6c0d7a13937fe66b27f87a1b128830a045 /mk | |
parent | 7f8f948c024c46282228243391238d09b297cd9d (diff) | |
download | haskell-7c555b054bf074a9ab612f9d93e3475bfb8c6594.tar.gz |
Optimize GHC.Utils.Monad.
Many functions in this module are recursive and as such are marked
loop breakers. Which means they are unlikely to get an unfolding.
This is *bad*. We always want to specialize them to specific Monads.
Which requires a visible unfolding at the use site.
I rewrote the recursive ones from:
foo f x = ... foo x' ...
to
foo f x = go x
where
go x = ...
As well as giving some pragmas to make all of them available
for specialization.
The end result is a reduction of allocations of about -1.4% for
nofib/spectral/simple/Main.hs when compiled with `-O`.
-------------------------
Metric Decrease:
T12425
T14683
T5631
T9233
T9675
T9961
WWRec
-------------------------
Diffstat (limited to 'mk')
0 files changed, 0 insertions, 0 deletions