[GHC] #9476: Implement late lambda-lifting

GHC ghc-devs at haskell.org
Fri Sep 7 09:28:26 UTC 2018


#9476: Implement late lambda-lifting
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  sgraf
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.2
      Resolution:                    |             Keywords:  LateLamLift
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #8763 #13286      |  Differential Rev(s):
       Wiki Page:  LateLamLift       |
-------------------------------------+-------------------------------------

Comment (by sgraf):

 Replying to [comment:32 simonpj]:
 > * Would you like to publish figures for your best option (`-f-5-5`,
 don't count void args, float over-sat apps)?

 I'm currently re-running benchmarks with the new void args thing, but I
 suspect that the results from comment:23 are pretty much the same, except
 for `fibheaps`. All results with at least 1% change:

 {{{
 --------------------------------------------------------------------------------
         Program         Allocs    Instrs
 --------------------------------------------------------------------------------
            anna          -1.1%     -0.4%
            atom          -0.8%     -1.1%
         circsim          -1.0%     -0.7%
        clausify          -1.9%     -0.4%
    cryptarithm1          -2.8%     -7.9%
    cryptarithm2          -4.0%     -2.4%
     exact-reals          -2.1%     -0.0%
          expert          -1.0%     -0.0%
            fft2          -1.0%     -0.3%
        fibheaps          -1.4%     -0.7%
           fluid          -1.5%     -0.6%
          hidden          -1.0%     -0.6%
           infer          -0.6%     -1.1%
    k-nucleotide          -0.0%     +2.4%
           kahan          -0.4%     -2.0%
            lcss          -0.1%     -5.8%
            mate          -8.4%     -3.5%
         mkhprog          -1.3%     -0.1%
          n-body         -20.2%     -0.0%
        nucleic2          -1.0%     -0.1%
          queens         -17.7%     -0.8%
       typecheck          -2.7%     -1.8%
 --------------------------------------------------------------------------------
             Min         -20.2%     -7.9%
             Max          +0.0%     +2.4%
  Geometric Mean          -0.8%     -0.3%
 }}}

 > * What happens to binary sizes?

 Good question, given that we push work from binding sites to call sites.
 It seems they consistently went down by 0.1%. I wonder why? Maybe some
 heap checks somewhere in `base`? Or is it just a wibble? Maybe I should
 re-evaluate my baseline...

 >
 > * I think you should write a paper!  It's very easy to forget all the
 things that are paged into your head at the moment.  Get them written down
 before you forget them!

 Yes, I'd love to! In fact, I started something at
 https://github.com/sgraf812/late-lam-lift. It's a bit rough and only has a
 section about the decision heuristics at the moment, but I'll post when
 there's something you could have a look at. In fact, I'd very much like it
 if Nicolas and/or you would co-author that with me, as I haven't really
 written a paper before. I think this would be an excellent exercise.

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


More information about the ghc-tickets mailing list