Skip to content
  • Simon Peyton Jones's avatar
    Three compile perf improvements with deep nesting · 1e84b924
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    These were changes are all triggered by #24471.
    
    1. Make GHC.Core.Opt.SetLevels.lvlMFE behave better when there are
       many free variables.  See Note [Large free-variable sets].
    
    2. Make GHC.Core.Opt.Arity.floatIn a bit lazier in its Cost argument.
       This benefits the common case where the ArityType turns out to
       be nullary. See Note [Care with nested expressions]
    
    3. Make GHC.CoreToStg.Prep.cpeArg behave for deeply-nested
       expressions.  See Note [Eta expansion of arguments in CorePrep]
       wrinkle (EA2).
    
    Compile times go down by up to 4.5%, and much more in artificial
    cases. (Geo mean of compiler/perf changes is -0.4%.)
    
    Metric Decrease:
        CoOpt_Read
        T10421
        T12425
    1e84b924