
#7865: SpecConstr duplicating computations ---------------------------------+------------------------------------------ Reporter: amosrobinson | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Keywords: SpecConstr | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Runtime performance bug Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by simonpj): * difficulty: => Unknown Comment: Excellent point. `SpecConstr` is (and I'm afraid must) do some on-the-fly simplification, but here is is going too far by duplicating an expensive sub-computation. I've made the on-the-fly inlining less aggressive; and written a long comment about it `Note [Work-free values only in environment]`. Pushing shortly. Thanks for identifying this so clearly. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7865#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler