[GHC] #11735: Optimize coercionKind
GHC
ghc-devs at haskell.org
Mon Jan 29 15:41:29 UTC 2018
#11735: Optimize coercionKind
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
There are a number of different things going on.
1. comment:5 gets rid of a non-linearity in `coercionKind` for the
`ForallCo` case. This is a big win. We definitely want it.
2. The same non-linearity is present in `coercionKindRole` so I suggested
getting rid of the duplication between the two. That seems possible by
caching the role in `NthCo`. Doing so doesn't solve any known performance
problems, but seems to be nicer code.
3. We have a clear problem in `simplCast`, which comes from transforming
{{{
(f |> co) @t1 @t2 ... @tn
===>
((f @t1') |> co1) @t2 ... @tn
===> (etc)
(f @t1' @t2' ... @tn') |> con
}}}
Doing these steps one at a time gives clearly non-linear behaviour.
Hence comment:10. I think comment:41 is in this territory.
I think it'd be helpful to separate these issues, possibly into separate
tickets.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11735#comment:48>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list