
#7258: Compiling DynFlags is jolly slow -------------------------------------+------------------------------------- Reporter: simonpj | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.1 Resolution: | Keywords: deriving-perf 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): Here's some tentative evidence: [[Image(https://ghc.haskell.org/trac/ghc/attachment/ticket/7258/stgVarsSizeRatio.png)]] The 3 misbehaving examples (read, show, and to a lesser degree read-appl) show linear growth of the free-variables/other-stg ratio (which suggests roughly quadratic growth of the size of the overall STG size, assuming linear growth of the base STG size), while the well-behaved examples maintain a more-or-less constant ratio. The full profiling job (up to 400 fields) is still running, but this small sample (50, 100 and 150 fields) looks pretty convincing to me already. A quick glance at the generated STG suggests that there is indeed some deep nesting of closures going on. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7258#comment:85 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler