summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2022-09-21 02:37:43 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-28 15:07:30 -0400
commitc2d73cb47562a86da76dae217d15f0dbd2b05b0e (patch)
treeb21e9907acc5c9beae9478300cb3b3514c461b33 /testsuite
parent9b1595c87f0c2406bb340c5e27a4a45dfcde0e2c (diff)
downloadhaskell-c2d73cb47562a86da76dae217d15f0dbd2b05b0e.tar.gz
Apply some tricks to speed up core lint.
Below are the noteworthy changes and if given their impact on compiler allocations for a type heavy module: * Use the oneShot trick on LintM * Use a unboxed tuple for the result of LintM: ~6% reduction * Avoid a thunk for the result of typeKind in lintType: ~5% reduction * lint_app: Don't allocate the error msg in the hot code path: ~4% reduction * lint_app: Eagerly force the in scope set: ~4% * nonDetCmpType: Try to short cut using reallyUnsafePtrEquality#: ~2% * lintM: Use a unboxed maybe for the `a` result: ~12% * lint_app: make go_app tail recursive to avoid allocating the go function as heap closure: ~7% * expandSynTyCon_maybe: Use a specialized data type For a less type heavy module like nofib/spectral/simple compiled with -O -dcore-lint allocations went down by ~24% and compile time by ~9%. ------------------------- Metric Decrease: T1969 -------------------------
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/count-deps/CountDepsAst.stdout1
-rw-r--r--testsuite/tests/count-deps/CountDepsParser.stdout1
2 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/tests/count-deps/CountDepsAst.stdout b/testsuite/tests/count-deps/CountDepsAst.stdout
index 423fd15533..3a6bae10fb 100644
--- a/testsuite/tests/count-deps/CountDepsAst.stdout
+++ b/testsuite/tests/count-deps/CountDepsAst.stdout
@@ -96,6 +96,7 @@ GHC.Data.Stream
GHC.Data.Strict
GHC.Data.StringBuffer
GHC.Data.TrieMap
+GHC.Data.Unboxed
GHC.Driver.Backend
GHC.Driver.Backend.Internal
GHC.Driver.CmdLine
diff --git a/testsuite/tests/count-deps/CountDepsParser.stdout b/testsuite/tests/count-deps/CountDepsParser.stdout
index b6e55ec846..df3f46f307 100644
--- a/testsuite/tests/count-deps/CountDepsParser.stdout
+++ b/testsuite/tests/count-deps/CountDepsParser.stdout
@@ -96,6 +96,7 @@ GHC.Data.Stream
GHC.Data.Strict
GHC.Data.StringBuffer
GHC.Data.TrieMap
+GHC.Data.Unboxed
GHC.Driver.Backend
GHC.Driver.Backend.Internal
GHC.Driver.Backpack.Syntax