Quantcast

[GHC] #13719: checkFamInstConsistency dominates compile time

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
#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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):
  #12191                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by niteria):

 * Attachment "gen.sh" added.

 gen.sh

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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):
  #12191                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 That does seem terrible.  Thanks for continuing to investiate and explore
 solutions.

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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):  phab:D3600
  #12191                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by niteria):

 * differential:   => phab:D3600


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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):  phab:D3600,
  #12191                             |  phab:D3602
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by niteria):

 * differential:  phab:D3600 => phab:D3600, phab:D3602


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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):  phab:D3600,
  #12191                             |  phab:D3602
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"17fef390c575c153c7e70438783e7f8fee62e451/ghc" 17fef39/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="17fef390c575c153c7e70438783e7f8fee62e451"
 Testcase for #13719

 I expect to improve this, a testcase will ensure
 it doesn't regress.

 Test Plan: ./validate

 Reviewers: simonmar, austin, bgamari

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie

 GHC Trac Issues: #13719

 Differential Revision: https://phabricator.haskell.org/D3600
 }}}

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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):  phab:D3600,
  #12191                             |  phab:D3602
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"2bc3a0570dac333cc7fb6f8038e08f36d62e4d13/ghc"
 2bc3a057/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2bc3a0570dac333cc7fb6f8038e08f36d62e4d13"
 Testcase for type family consistency checks

 Based on my quick search, we don't have a test
 that verifies that we check the type family instances of
 currently compiled module against direct or indirect
 dependencies.

 This adds two tests: for a direct dependency and
 for an indirect dependency.

 I also added a comment to make it clear what the 'Over'
 test tests.

 Other than completeness, it makes sense to have these
 tests because if you look at
 Note [The type family instance consistency story] in FamInsts
 these cases are checked through different mechanisms.

 Test Plan: new tests

 Reviewers: simonmar, rwbarton, simonpj, austin, bgamari

 Reviewed By: simonpj, bgamari

 Subscribers: thomie

 GHC Trac Issues: #13719

 Differential Revision: https://phabricator.haskell.org/D3602
 }}}

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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GHC] #13719: checkFamInstConsistency dominates compile time

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#13719: checkFamInstConsistency dominates compile time
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13092, #13099,   |  Differential Rev(s):  phab:D3600,
  #12191                             |  phab:D3602, phab:D3603
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by niteria):

 * differential:  phab:D3600, phab:D3602 => phab:D3600, phab:D3602,
                   phab:D3603


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

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Loading...