
#11095: -O0 -g slows GHC down on list literals (compared to -O0 without -g) -------------------------------------+------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 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): phab:D3001 Wiki Page: | -------------------------------------+------------------------------------- Changes (by niteria): * differential: => phab:D3001 Comment: This still reproduces on GHC HEAD. @slyfox: Thanks for the profile, it was helpful to know where to look. phab:D3001 optimizes the hot `tickishContains` function a bit. I've experimented with this a bit and here's what I found: * 45 `()` literals generates 20929 `mkTick'` calls and 1371 `mkTick` calls. * 90 `()` literals generates 143074 `mkTick'` calls and 4746 `mkTick` calls. * 135 `()` literals generates 457594 `mkTick'` calls and 10146 `mkTick` calls. In the 45 case almost all of the calls come from `wrapTicks`, and out of these most of them (~20k) come from: {{{ wrapBind t (NonRec binder rhs) = NonRec binder (mkTick t rhs) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11095#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler