[GHC] #7428: GHC compile times are seriously non-linear in program size

GHC ghc-devs at haskell.org
Mon Jun 15 23:29:56 UTC 2015


#7428: GHC compile times are seriously non-linear in program size
-------------------------------------+-------------------------------------
        Reporter:  nudded            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.4.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by bgamari):

 I may be missing something obvious here but I'm not convinced that the
 problem is in `CorePrep` or `TidyCore`. If one looks at the `hi` file or
 `-ddump-simpl` output from even a relatively shallow four-layer
 transformer stack one finds quite large types that appear to be growing
 quadratically in the depth. This is supported by the fact that `Type` and
 `IfaceType` show up strongly in the heap profiles as well as the fact
 that, in my runs, `core2core` shows up about as strongly in the profiles
 as `addFingerprints`.

 Looking at the types in the Core, it seems that the inliner may be over-
 zealous in its work. Due to the CPS style of the example, the types
 snowball extremely quickly. Most of the damage comes in the first two
 simplifier iterations. Many of the larger of these types are coercions and
 their signatures.

 I'm not sure I see what is failing here. The question then is what measure
 is supposed to prevent this snow-balling and why is it not working? I'll
 have another look tomorrow.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7428#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list