[GHC] #14737: Improve performance of Simplify.simplCast
GHC
ghc-devs at haskell.org
Fri Mar 30 20:32:48 UTC 2018
#14737: Improve performance of Simplify.simplCast
-------------------------------------+-------------------------------------
Reporter: tdammers | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #11735 #14683 | Differential Rev(s): Phab:D4385
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Try getting rid of the first equation for `puchCoTyArg`
{{{
pushCoTyArg co ty
| tyL `eqType` tyR
= Just (ty, mkRepReflCo (piResultTy tyR ty))
}}}
This is another big pile of type-equalities, rather like calling
`isReflexiveCo` at the wrong moment.
Claim: if it happens that `tyL` = `tyR`, but we go ahead with all that
`mkCoherenceLeftCo` stuff anyway, then the coercion optimiser will get rid
of it later. '''Richard''': will it?
But try that change anyway. NO WAY should `pushCoTyArg` take 54% of
compile time!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14737#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list