[GHC] #14737: Improve performance of Simplify.simplCast
GHC
ghc-devs at haskell.org
Mon Mar 26 15:14:26 UTC 2018
#14737: Improve performance of Simplify.simplCast
-------------------------------------+-------------------------------------
Reporter: tdammers | Owner: (none)
Type: bug | Status: patch
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): Phab:D4385
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by tdammers):
Now that we have implemented the fix as outlined in D4395, it turns out
that while the change is desirable overall, it does not actually improve
performance significantly; `simplCast` still appears at the top of the
profile, as evidenced here:
{{{
Mon Mar 26 15:24 2018 Time and Allocation Profiling Report
(Final)
ghc-stage2 +RTS -p -RTS -B/home/tobias/well-
typed/devel/ghc/D4395-modified/inplace/lib ./cases/Grammar.hs -o ./a
-fforce-recomp
total time = 19.66 secs (19655 ticks @ 1000 us, 1
processor)
total alloc = 24,638,084,488 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC
%time %alloc
simplCast Simplify
compiler/simplCore/Simplify.hs:(1213,5)-(1215,37) 73.8 76.0
tc_rn_src_decls TcRnDriver
compiler/typecheck/TcRnDriver.hs:(494,4)-(556,7) 8.3 8.4
CoreTidy HscMain compiler/main/HscMain.hs:1253:27-67
2.8 2.2
SimplTopBinds SimplCore compiler/simplCore/SimplCore.hs:770:39-74
2.7 1.9
coercionKind Coercion compiler/types/Coercion.hs:1698:3-7
1.8 3.4
zonkTopDecls TcRnDriver
compiler/typecheck/TcRnDriver.hs:(445,16)-(446,43) 1.3 1.3
deSugar HscMain compiler/main/HscMain.hs:511:7-44
1.1 0.8
}}}
We clearly shouldn't be spending 15 seconds in `simplCast`, so more
digging is required.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14737#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list