#14737: Improve performance of Simplify.simplCast -------------------------------------+------------------------------------- Reporter: tdammers | Owner: goldfire Type: bug | Status: patch Priority: highest | Milestone: 8.6.1 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: | Phab:D4568 -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"7bb7f991e2b04b7daed079bab9e63884404802a0/ghc" 7bb7f99/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7bb7f991e2b04b7daed079bab9e63884404802a0" Discard reflexive casts during Simplify Trac #14735 (derived from Trac #11735) found that 75% of compile time was being spent in simplCast. This patch is the first in a series to deal with that problem. This particular patch actually has very little effect on performance; it just refactors simplCast so that it builds Refl coercions less often. Refl coercions require us to compute the type to put inside them, and even if that's done lazily it is still work and code. Instead we use Maybe Coercion with Nothing for Refl. This change also percolates to pushCoTyArg and pushValArg. Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14737 Differential Revision: https://phabricator.haskell.org/D4395 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14737#comment:25> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler