[GHC] #14738: Investigate performance of CoreTidy

GHC ghc-devs at haskell.org
Mon Feb 5 11:50:52 UTC 2018


#14738: Investigate performance of CoreTidy
-------------------------------------+-------------------------------------
        Reporter:  tdammers          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       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:  #11735 #14683     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tdammers):

 Profile, based on GHC HEAD + some changes from #11735 + added SCCs,
 compiling `Grammar.hs`:

 {{{
         Mon Feb  5 12:47 2018 Time and Allocation Profiling Report
 (Final)

            ghc-stage2 +RTS -p -RTS -B/home/tobias/well-
 typed/devel/ghc/inplace/lib Grammar.hs -fforce-recomp

         total time  =       12.73 secs   (12733 ticks @ 1000 us, 1
 processor)
         total alloc = 14,413,041,648 bytes  (excludes profiling overheads)

 COST CENTRE             MODULE     SRC
 %time %alloc

 addCoerce-pushCoTyArg   Simplify
 compiler/simplCore/Simplify.hs:1234:70-90            46.7   45.7
 tc_rn_src_decls         TcRnDriver
 compiler/typecheck/TcRnDriver.hs:(494,4)-(556,7)     12.2   14.0
 subst_ty                TyCoRep    compiler/types/TyCoRep.hs:2265:28-32
 7.0   10.4
 tidyTopBinds            TidyPgm    compiler/main/TidyPgm.hs:370:21-82
 3.3    3.5
 writeIface              HscMain    compiler/main/HscMain.hs:1279:9-45
 3.2    0.2
 coercionKind            Coercion   compiler/types/Coercion.hs:1735:3-7
 3.0    6.0
 zonkTopDecls            TcRnDriver
 compiler/typecheck/TcRnDriver.hs:(445,16)-(446,43)    2.1    2.2
 simplExprF1-Lam         Simplify   compiler/simplCore/Simplify.hs:896:5-39
 1.7    2.2
 simplCast-simplCoercion Simplify
 compiler/simplCore/Simplify.hs:1224:57-77             1.6    1.5
 deSugar                 HscMain    compiler/main/HscMain.hs:511:7-44
 1.5    1.3
 findExternalRules       TidyPgm    compiler/main/TidyPgm.hs:366:23-77
 1.1    0.2
 Parser                  HscMain
 compiler/main/HscMain.hs:(316,5)-(384,20)             1.1    1.6
 simplIdF                Simplify
 compiler/simplCore/Simplify.hs:868:61-79              1.0    0.5
 simplCast-addCoerce     Simplify
 compiler/simplCore/Simplify.hs:1225:53-71             1.0    1.0
 }}}

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


More information about the ghc-tickets mailing list