
#13253: Exponential compilation time with RWST & ReaderT stack with `-02` -------------------------------------+------------------------------------- Reporter: phadej | Owner: bgamari, osa1 Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #15630 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Hypothesis: * `SpecConstr` is specialising a function `f1` * In `f`'s RHS there is a local function `f2` * In each specialised copy of `f1` we create two specialised copies of `f2` * Alas `f2` has a nested function `f3` -- and it too specialises... and so on. Result: the specialised code is exponential in the nesting depth. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13253#comment:43 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler