
#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 goldfire): I'm dubious of the `coercionRole` refactor, as it undoes a refactoring I put in a few years ago, for performance reasons. The problem is that `coercionRole` depends on `coercionKind` in the `NthCo` case. So, if these functions are separated, then `coercionRole` recurs via both `coercionKind` and `coercionRole` sometimes, causing a lot of extra work. Note that a standalone `coercionKind` does exist, also for performance reasons. To be clear, I'm not doubting your numbers on your particular test case, but I'm not sure how far this would generalize. That said, the degree to which your case improved suggests there's some other inefficiency here. Maybe it's all the tuples? If we make them unboxed, does that fix the problem? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11735#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler