Skip to content
  • niteria's avatar
    Make checkFamInstConsistency less expensive · 12306294
    niteria authored
    Doing canonicalization on every comparison turned
    out to be very expensive.
    
    Caching the canonicalization through the smart `modulePair` constructor
    gives `8%` reduction in allocations on `haddock.compiler` and
    `8.5%` reduction in allocations on `haddock.Cabal`.
    Possibly other things as well, but it's really visible in Haddock.
    
    Test Plan: ./validate
    
    Reviewers: jstolarek, simonpj, austin, simonmar, bgamari
    
    Reviewed By: simonpj, simonmar
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2350
    
    GHC Trac Issues: #12191
    12306294