[GHC] #7542: GHC doesn't optimize (strict) composition with id
GHC
ghc-devs at haskell.org
Mon Feb 10 17:05:21 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 ekmett):
@nomeata:
As I understand the situation, the fact that this optimization isn't
happening without `-fpedantic-bottoms` means I'm basically stuck using the
existing hacks in `lens`.
The code in question is set up to `INLINE` in library into user code, and
they very likely aren't compiling with that flag! (Unless I'm
misunderstanding how and where that gets tracked and applid.)
We have 3 cases to consider, the existing unsafeCoerce hack, the naive eta
expansion we're getting without `-fpedantic-bottoms`, and the version
without the eta expansion we can produce with `-fpedantic-bottoms`. It
appears that the first and the third scenarios are now the same, but the
difference in performance between the existing unsafeCoerce hack and the
eta expanded code can be asymptotic, if this is closed as is, the fix does
me no good, and I'll be left using the existing coercions to ensure a good
user experience. =/
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7542#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list