[GHC] #7436: Derived Foldable and Traversable instances become extremely inefficient due to eta-expansion

GHC cvs-ghc at haskell.org
Wed Nov 21 14:36:16 CET 2012


#7436: Derived Foldable and Traversable instances become extremely inefficient due
to eta-expansion
---------------------------------+------------------------------------------
    Reporter:  shachaf           |       Owner:                         
        Type:  bug               |      Status:  new                    
    Priority:  normal            |   Milestone:                         
   Component:  Compiler          |     Version:  7.6.1                  
    Keywords:                    |          Os:  Unknown/Multiple       
Architecture:  Unknown/Multiple  |     Failure:  Runtime performance bug
  Difficulty:  Unknown           |    Testcase:                         
   Blockedby:                    |    Blocking:                         
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 I'm very surprised that the eta-expanded version has asymptotically worse
 behaviour.

 Could you generate an example with hand-written code (not generated by
 `deriving`) that elicits this behaviour?  I'm gueesing that'd be simple do
 to, and it'd save wading through mountains of irrelevant Core.  The
 smaller and more standalone the test case, the better.

 I'm vaguely wondering whether it might be a space issue; ie takes lots of
 space for chains of partial applications etc.  Maybe you can use `+RTS -s`
 for each version and give us the output.  Thanks!

 Simon

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



More information about the Glasgow-haskell-bugs mailing list