[GHC] #11735: Optimize coercionKind
GHC
ghc-devs at haskell.org
Wed Jan 24 12:03:18 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:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
> We should do the same thing to coercionKindRole. (Tiresomely.)
Actually, looking at it, I think it'd be better to define
{{{
coercionRole :: Coercion -> Role
}}}
directly (a simple, fast recursive function), and then define
{{{
coercionKindRole :: Coercion -> (Pair Type, Role)
coercionKindRole co = (coercionKind co, coercionRole co)
}}}
Less duplication, and (I strongly suspect) faster. Could you try that and
check perf?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11735#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list