#7258: Compiling DynFlags is jolly slow
---------------------------------+------------------------------------------
Reporter: simonpj | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonpj@…):
commit 9ea2b6666cb6684279a120c688e8557bcef3dc73
{{{
Author: Simon Peyton Jones <[email protected]>
Date: Mon Dec 24 11:34:51 2012 +0000
Simplify the binder-swap transformation
The occurrence analyser implements the "binder-swap" transformation,
described in Note [Binder swap] in OccAnal. For some reason I had
implemeted an extremely complicated version, I believe intended to get
as much as possible done in single simplifier pass. But it turned
out (Trac #7258) that the 'getProxies' bit of this complicated code
scaled rather non-linearly, and all by itself could consume half of
the entire compile time.
The patch dramatically simplifies the transformation, so that
we simply swizzle
case x of y { I# v -> e }
to
case x of y { I# v -> let x = y in e }
I can't see any reason not to do this
* Compiler allocation for #7258 with 200 fields goes down by 25%
and compile time by 20%
* The nofib figures do not budge
* Quite a bit of complicated code goes away
compiler/simplCore/OccurAnal.lhs | 255
+++++++-------------------------------
1 files changed, 46 insertions(+), 209 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7258#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs