
#15703: Significant compilation time blowup when refactoring singletons-heavy code -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.1 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 RyanGlScott): I attached the results of compiling `Lib.hs` with `-dshow-passes` enabled. Of particular note is: {{{ Result size of Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False}) = {terms: 950, types: 14,499, coercions: 83,275, joins: 0/12} !!! Float out(FOS {Lam = Just 0, Consts = True, OverSatApps = False}) [Lib]: finished in 28.01 milliseconds, allocated 19.390 megabytes *** Simplifier [Lib]: Result size of Simplifier iteration=1 = {terms: 924, types: 12,141, coercions: 235,672, joins: 0/46} Result size of Simplifier iteration=2 = {terms: 755, types: 5,948, coercions: 312,927, joins: 0/17} Result size of Simplifier iteration=3 = {terms: 715, types: 3,828, coercions: 403,226, joins: 0/2} Result size of Simplifier = {terms: 703, types: 3,759, coercions: 228,342, joins: 0/2} !!! Simplifier [Lib]: finished in 208488.74 milliseconds, allocated 373891.763 megabytes *** Simplifier [Lib]: Result size of Simplifier = {terms: 703, types: 3,759, coercions: 228,342, joins: 0/2} }}} The number of coercions appears to jump between float-out and the first simplifier pass. However, it's a later simplifier pass that takes up the bulk of the time (208488.74 milliseconds of it). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15703#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler