
#13536: Program which terminates instantly in GHC 8.0.2 runs for minutes with 8.2.1 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Well this is quite interesting. The culprit is apparently the new STG CSE pass. It's fast with `-fno-stg-cse` and slow with `-fstg-cse`, and the only change in the STG is {{{#!diff case eta_s5Di of { (,) a_s5Dn [Occ=Once] b_s5Do [Occ=Once] -> - (,) [a_s5Dn b_s5Do]; + eta_s5Di; }; }}} which is the body of {{{#!hs unmodel (a,b) = (unmodel a, unmodel b) }}} It certainly makes sense that STG CSE would do that and that it couldn't be done in Core-level CSE, because the types `Model Bool` and `Bool` are different there; but I don't yet understand why it is ''bad'' in this program. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13536#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler