[GHC] #11735: Optimize coercionKind

GHC ghc-devs at haskell.org
Wed Jan 24 13:38:08 UTC 2018


#11735: Optimize coercionKind
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tdammers):

 Applying the `coercionKind` patch brings down compilation time for the
 `Grammar.hs` example from #14683 to about 30 seconds. Relevant profiling
 data:

 {{{
         Wed Jan 24 14:33 2018 Time and Allocation Profiling Report
 (Final)

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

         total time  =       32.48 secs   (32475 ticks @ 1000 us, 1
 processor)
         total alloc = 43,424,804,608 bytes  (excludes profiling overheads)

 COST CENTRE           MODULE     SRC
 %time %alloc

 CoreTidy              HscMain    compiler/main/HscMain.hs:1253:27-67
 20.3   22.6
 subst_ty              TyCoRep    compiler/types/TyCoRep.hs:2225:28-32
 17.7   23.9
 Stg2Stg               HscMain    compiler/main/HscMain.hs:1489:12-44
 13.9   16.3
 simplCast             Simplify   compiler/simplCore/Simplify.hs:871:62-87
 12.8   10.7
 simplCast-addCoerce   Simplify   compiler/simplCore/Simplify.hs:1225:53-71
 11.6    9.2
 tc_rn_src_decls       TcRnDriver
 compiler/typecheck/TcRnDriver.hs:(494,4)-(556,7)      6.4    4.6
 addCoerce-pushCoTyArg Simplify
 compiler/simplCore/Simplify.hs:(1236,12)-(1237,72)    5.0    4.3
 preprocessFile        GhcMake
 compiler/main/GhcMake.hs:(2416,1)-(2443,37)           1.0    0.0
 coercionKind          Coercion   compiler/types/Coercion.hs:1707:3-7
 1.0    1.9
 }}}

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


More information about the ghc-tickets mailing list