[GHC] #11735: Optimize coercionKind

GHC ghc-devs at haskell.org
Tue Apr 10 15:37:22 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:  #14683 #14975     |  Differential Rev(s):  D4394 D4395
  #14737                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

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/11735#comment:86>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list