[GHC] #7542: GHC doesn't optimize (strict) composition with id
GHC
ghc-devs at haskell.org
Mon Feb 10 17:47:50 UTC 2014
#7542: GHC doesn't optimize (strict) composition with id
--------------------------------------------+------------------------------
Reporter: shachaf | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime performance bug | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by nomeata):
Tracing this back I found the `Note [Dealing with bottom]` in `CoreArity`,
where the arity of case branches is used to calculate the arity of a case.
Quote:
> We ignore this "problem" (unless -fpedantic-bottoms is on), because
being scrupulous would lose an important transformation for many programs.
(See Trac #5587 for an example.)
So the next step would be answering: Can we distinguish between cases
where this dodgy optimization is useful and required, and cases where it
hurts?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7542#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list