[GHC] #13719: checkFamInstConsistency dominates compile time

GHC ghc-devs at haskell.org
Thu May 18 12:04:46 UTC 2017


#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
           Reporter:  niteria        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.3
  (Type checker)                     |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  performance bug
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #13092, #13099,
                                     |  #12191
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I'm looking into compile time issues on our internal code base.
 `checkFamInstConsistency` takes 50% of all compile time for `:load` in
 `ghci` for us.

 I've created a synthetic test case that approximates the issue and in
 which compiling 300 modules with one small data type each takes 65s total,
 and `checkFamInstConsistency` is 87% of that and 94.1% of allocations.
 `checkFamInstConsistency` is run to ensure consistency of a type family
 associated with Generics, but that's only semi-relevant.

 To reproduce:
 {{{
 ./gen.sh
 ./inplace/bin/ghc-stage2 -keep-tmp-files DummyLevel3M100.hs
 }}}

 Profile with some relevant cost centres:
 https://phabricator.haskell.org/P150

 The next step is to look into implementing:
 https://ghc.haskell.org/trac/ghc/ticket/13092#comment:14

 I also plan to add this test case to the codebase.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13719>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list