#5321: Very slow constraint solving for type families
----------------------------------------+-----------------------------------
    Reporter:  simonpj                  |       Owner:                          
       
        Type:  bug                      |      Status:  new                     
       
    Priority:  normal                   |   Milestone:  7.4.1                   
       
   Component:  Compiler (Type checker)  |     Version:  7.0.3                   
       
    Keywords:                           |          Os:  Unknown/Multiple        
       
Architecture:  Unknown/Multiple         |     Failure:  Compile-time 
performance bug   
  Difficulty:  Unknown                  |    Testcase:  perf/compiler/T5321Fun, 
T5321FD
   Blockedby:                           |    Blocking:                          
       
     Related:                           |  
----------------------------------------+-----------------------------------
Changes (by simonpj):

  * testcase:  => perf/compiler/T5321Fun, T5321FD
  * difficulty:  => Unknown


Comment:

 I've just tried this with the HEAD (roughly 7.4).  Here's what I get.

 With functional dependencies:
 {{{
 testHMapFoo1     0.76sec    291Mbyte allocated
 testHMapFoo2     0.41sec    161Mbyte allocated
 testHMapFoo3     0.43sec    178Gbyte allocated
 }}}
 With type functions:
 {{{
 testHMapFoo1     0.71sec    297Mbyte allocated
 testHMapFoo2     0.64sec    274Mbyte allocated
 testHMapFoo3     0.65sec    274Gbyte allocated
 }}}
 I'm a bit surprised that the type-function version is slower. Dimitrios:
 it might be worth profiling to see where the time is going.

 But it's reassuring that the performance fragility wrt the order of
 constraints seems to have gone away.

 NB: this is without `-dcore-lint`, which makes a big difference because in
 programs like this we get pretty big coercions.

 I'm adding `T5321Fun` and `T5321FD` as performance tests.  Currently all
 tests are run with `-dcore-lint` on, so the performance numbers are much
 worse than those above.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to