Skip to content
  • Simon Peyton Jones's avatar
    Re-do the "function application discount" (fixes Trac #6048) · 980372f3
    Simon Peyton Jones authored
    * Undoes Max's very aggressive function-inlining change
      (see comments with Trac #6048)
    
    * Resticts function application discount to functions
      that occur just once in the body. It was the multiple
      occurrences that led to the exponential behavour in
      Trac #6048.
    
    See Note [Function application discount] in CoreUnfold.
    
    Module binary sizes are down 2% on average, which is good.
    Allocations wobble about a bit, but only on a few benchmarks
    and not by much, so it seems a price worth paying to avoid
    exponential behaviour!
    
                             Allocs
                Min           -1.2%
                Max           +2.8%
     Geometric Mean           +0.0%
    980372f3