[GHC] #14052: Significant GHCi speed regression with :module and `let` in GHC 8.2.1

GHC ghc-devs at haskell.org
Mon Jul 31 21:40:46 UTC 2017


#14052: Significant GHCi speed regression with :module and `let` in GHC 8.2.1
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  GHCi              |              Version:  8.2.1-rc2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by phadej):

 I added two time profiles, running the variants of ryan's test-case, with
 and without ":m *Foo".

 They look similar, but in bad behaviour withCleanupSession does something,
 which takes half of the time.

 {{{
 individual      inherited
 COST CENTRE                        MODULE      no.      entries  %time
 %alloc


 WITH :m *Foo, BAD behaviour

    withCleanupSession              GHC         1501          1   50.2
 90.2    99.9   99.9
     hscStmtWithLocation            HscMain     2406       1201    0.0
 0.0    16.5    9.4
      hscParseStmtWithLocation      HscMain     2407       1201    0.0
 0.0     0.1    0.1
       hscParseThingWithLocation    HscMain     2408       1201    0.0
 0.0     0.1    0.1
        Parser                      HscMain     2409       1201    0.1
 0.1     0.1    0.1
         logWarningsReportErrors    HscMain     2410       1201    0.0
 0.0     0.0    0.0
          logWarnings               HscMain     2411       1201    0.0
 0.0     0.0    0.0
      hscParsedStmt                 HscMain     2412       1201    1.4
 1.7    16.4    9.3
       ioMsgMaybe                   HscMain     2413       2402    8.7
 4.3    10.9    5.2
        Digraph.topSort             Digraph     2414       7508    0.0
 0.0     0.0    0.0
        solveSimples                TcInteract  2424       6307    0.1
 0.0     2.0    0.9
         solve_loop                 TcInteract  2426          0    1.5
 0.7     1.9    0.9
          canEvVar                  TcCanonical 2427       8108    0.4
 0.2     0.4    0.2
          canClass                  TcCanonical 2428        901    0.0
 0.0     0.0    0.0

 WITHOUT :m *Foo, GOOD behaviour

    withCleanupSession              GHC         1501          1    6.4
 16.8    99.8   99.3
     hscStmtWithLocation            HscMain     2406       1201    0.0
 0.0    30.9   81.2
      hscParseStmtWithLocation      HscMain     2407       1201    0.0
 0.0     0.3    1.0
       hscParseThingWithLocation    HscMain     2408       1201    0.0
 0.0     0.3    1.0
        Parser                      HscMain     2409       1201    0.3
 0.9     0.3    0.9
         logWarningsReportErrors    HscMain     2410       1201    0.0
 0.0     0.0    0.0
          logWarnings               HscMain     2411       1201    0.0
 0.0     0.0    0.0
      hscParsedStmt                 HscMain     2412       1201    2.8
 14.4    30.5   80.2
       ioMsgMaybe                   HscMain     2413       2402   16.3
 37.2    20.2   45.2
        Digraph.topSort             Digraph     2414       7508    0.0
 0.1     0.0    0.1
        solveSimples                TcInteract  2424       6307    0.2
 0.1     3.6    7.6
         solve_loop                 TcInteract  2426          0    2.7
 5.7     3.4    7.5
          canEvVar                  TcCanonical 2427       8108    0.8
 1.7     0.8    1.7
          canClass                  TcCanonical 2428        901    0.0
 0.1     0.0    0.1
 }}}

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


More information about the ghc-tickets mailing list