[GHC] #11146: Manual eta expansion leads to orders of magnitude less allocations

GHC ghc-devs at haskell.org
Mon Nov 30 19:32:22 UTC 2015


#11146: Manual eta expansion leads to orders of magnitude less allocations
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 > Yes, it's enough to not export the functions I want eta-expanded.
 Unfortunately that's exactly what I want do in ​Phab:D1537 because I'm
 composing a computation from smaller pieces from several modules.

 Then GHC (likely Call Arity \o/) seems to be smart enough to do the
 expansion if it is allowed to operate on the whole code at once, as
 desired.

 But with the code spread over several modules, there isn’t really much GHC
 can do here. You could try to make it `INLINE` more aggressively, or
 simply do the eta-expansion as you do now.

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


More information about the ghc-tickets mailing list