[commit: ghc] master: Comments only (a391a38)

git at git.haskell.org git at git.haskell.org
Mon Oct 17 07:55:58 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a391a386e6cf00b8192c5d52a898a86a1e436eb8/ghc

>---------------------------------------------------------------

commit a391a386e6cf00b8192c5d52a898a86a1e436eb8
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Oct 14 17:50:28 2016 +0100

    Comments only


>---------------------------------------------------------------

a391a386e6cf00b8192c5d52a898a86a1e436eb8
 testsuite/tests/perf/compiler/T5030.hs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/testsuite/tests/perf/compiler/T5030.hs b/testsuite/tests/perf/compiler/T5030.hs
index 6bb7478..4983ee6 100644
--- a/testsuite/tests/perf/compiler/T5030.hs
+++ b/testsuite/tests/perf/compiler/T5030.hs
@@ -169,6 +169,19 @@ instance CPU DummyCPU where
 -------------------------------------------------------------------------------
 -- Long compiling program.
 
+{-  cnst has very simple code, and should be fast to typecheck
+    But if you insist on normalising (Immediate DummyCPU) you get
+
+      Immediate DummyCPU =  Const (ImmSize DummyCPU)
+                         -> Const SIZE12
+                         =  Const (DPlus SIX SIX)
+                         ...etc...
+
+similarly for (RegVar DummyCPU).
+
+So you get a lot of work and big coercions, for no gain.
+-}
+
 cnst :: Integer -> Either (Immediate DummyCPU) (RegVar DummyCPU)
 cnst x = Left (Const x)
 



More information about the ghc-commits mailing list