[GHC] #14683: Slow compile times for Happy-generated source

GHC ghc-devs at haskell.org
Tue Jan 23 12:19:16 UTC 2018


#14683: Slow compile times for Happy-generated source
-------------------------------------+-------------------------------------
        Reporter:  harpocrates       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by alexbiehl):

 Tobias, I saw you mentioning #7258 here.

 I ran over `Grammar.hs` with my sampling code from for #14461:

 - there are 245 non-toplevel StgRhsClosures
 - the deepest StgRhsClosure is nested 5 levels
 - Of that 245,
   - 168 have 0 free variables
   - 53 have 1 free variables
   - 16 have 2 free variables
   - 6 have 3 free variables
   - 1 has 4 free variables
   - 1 has 7 free variables
   -
   - 206 share 0 free variables with their parent
   - 32 share 1 free variable with their parent
   - 6 share 2 free variables with their parent
   - 1 shares 3 free variables with their parent

 I think this is not related to code generation. My timing shows most of
 the time is spent before CoreToStg. Codegen is a lot less. Our
 pathological cases #7258 had A LOT more (basically around 100
 StgRhsClosures sharing around 150 fvs with their parents) free variable
 business going on.

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


More information about the ghc-tickets mailing list