
#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: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Replying to [comment:43 goldfire]:
OK. I've fixed a few testsuite failures. I think this is probably correct now. (CircleCI reports a bunch of errors in `profiling`, but I can't repro locally.)
What happens when you benchmark?
Curiously, the latest version clocks in at about 25 seconds for Grammar.hs, so almost as fast, but not quite, as the fastest we've seen so far (~21 seconds): {{{ Mon Jan 29 09:43 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 = 25.95 secs (25950 ticks @ 1000 us, 1 processor) total alloc = 33,815,717,032 bytes (excludes profiling overheads) COST CENTRE MODULE SRC %time %alloc simplCast Simplify compiler/simplCore/Simplify.hs:871:62-87 26.0 21.8 CoreTidy HscMain compiler/main/HscMain.hs:1253:27-67 19.9 24.7 Stg2Stg HscMain compiler/main/HscMain.hs:1489:12-44 17.6 20.9 addCoerce-pushCoTyArg Simplify compiler/simplCore/Simplify.hs:(1251,12)-(1254,36) 10.5 9.0 tc_rn_src_decls TcRnDriver compiler/typecheck/TcRnDriver.hs:(494,4)-(556,7) 7.3 6.0 subst_ty TyCoRep compiler/types/TyCoRep.hs:2240:28-32 3.5 4.4 coercionKind Coercion compiler/types/Coercion.hs:1711:3-7 2.1 4.6 zonkTopDecls TcRnDriver compiler/typecheck/TcRnDriver.hs:(445,16)-(446,43) 1.1 0.9 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11735#comment:44 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler