summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2022-08-05 02:04:52 +0200
committerAndreas Klebinger <klebinger.andreas@gmx.at>2022-08-08 12:04:53 +0000
commitde465b0365537d525344214893f0b77ca4db758f (patch)
treeeaa56932eb026bdf83b2aaf1ca4edbc8074947d0
parent78d04cfadfd728bb088b08b1e88905b43cc0360c (diff)
downloadhaskell-de465b0365537d525344214893f0b77ca4db758f.tar.gz
Note [Trimming auto-rules]: State that this improves compiler perf.wip/andreask/keep-auto-rules-note
-rw-r--r--compiler/GHC/Iface/Tidy.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs
index 7fec591196..5f22f0275a 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -965,6 +965,13 @@ NB: if a binding is kept alive for some *other* reason (e.g. f_spec is
called in the final code), we keep the rule too.
This stuff is the only reason for the ru_auto field in a Rule.
+
+NB: In #18532 we looked at keeping auto-rules and it turned out to just make
+compiler performance worse while increasing code sizes at the same time. The impact
+varied. Compiling Cabal got ~3% slower, allocated ~3% more and wrote 15% more code to disk.
+Nofib only saw 0.7% more compiler allocations and executable file size growth. But given
+there was no difference in runtime for these benchmarks it turned out to be flat out worse.
+See the ticket for more details.
-}
findExternalRules :: TidyOpts