
#12150: Compile time performance degradation on code that uses undefined/error with CallStacks -------------------------------------+------------------------------------- Reporter: thomie | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.2.2 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: #10844 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): I see that GHC HEAD now optimizes the gigantic redundant `case` away (eventually), but it still goes more slowly than we'd like. For example, in GHC 7.10, `-ddump-spec` shows that all the redundant crud is already gone, whereas on GHC 8.3, it is still there then. I would like to understand how 7.10 gets rid of the extra cases before demand analysis. Is it using the fact that there are nested matches on the same constructor? Does that test not ignore type arguments it should? Interestingly, it seems that at a certain point `bool` actually gets inlined at a bunch of call sites (some in normal terms; some in unfoldings), but not all. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12150#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler