[GHC] #14610: newtype wrapping of a monadic stack kills performance
GHC
ghc-devs at haskell.org
Tue Dec 26 19:42:00 UTC 2017
#14610: newtype wrapping of a monadic stack kills performance
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.2.2
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: |
-------------------------------------+-------------------------------------
Changes (by nomeata):
* cc: nomeata (added)
Comment:
The polymorphic `go` in comment:3 is a separate problem from the one that
I described further up (but it might well be the OP’s problem). It could
be fixed by static argument transformation. On my TODO list, after #14068,
is SAT for join points, but it would not help here, because only after SAT
it is a join point. Exitification unfortunately also does not help to turn
this into a joint point. Maybe worth opening a separate ticket.
Your example in comment:4 is precisely what I described, thanks for
working it out. The fix here probably requires some significant thought
about the join point typing. Maybe it is enough to relax the rule “The
return type must not depend on any arguments” to “The return type must be
representatoinally equal for all arguments” and that might allow us to
{{{e `cast` co}}} to be a tail-call position.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14610#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list