Skip to content
  • Simon Peyton Jones's avatar
    2b7c71cb
    Improve eta-expansion using ArityType · 2b7c71cb
    Simon Peyton Jones authored
    As #18355 shows, we were failing to preserve one-shot info when
    eta-expanding.  It's rather easy to fix, by using ArityType more,
    rather than just Arity.
    
    This patch is important to suport the one-shot monad trick;
    see #18202.  But the extra tracking of one-shot-ness requires
    the patch
    
       Define multiShotIO and use it in mkSplitUniqueSupply
    
    If that patch is missing, ths patch makes things worse in
    GHC.Types.Uniq.Supply.  With it, however, we see these improvements
    
        T3064     compiler bytes allocated -2.2%
        T3294     compiler bytes allocated -1.3%
        T12707    compiler bytes allocated -1.3%
        T13056    compiler bytes allocated -2.2%
    
    Metric Decrease:
        T3064
        T3294
        T12707
        T13056
    2b7c71cb
    Improve eta-expansion using ArityType
    Simon Peyton Jones authored
    As #18355 shows, we were failing to preserve one-shot info when
    eta-expanding.  It's rather easy to fix, by using ArityType more,
    rather than just Arity.
    
    This patch is important to suport the one-shot monad trick;
    see #18202.  But the extra tracking of one-shot-ness requires
    the patch
    
       Define multiShotIO and use it in mkSplitUniqueSupply
    
    If that patch is missing, ths patch makes things worse in
    GHC.Types.Uniq.Supply.  With it, however, we see these improvements
    
        T3064     compiler bytes allocated -2.2%
        T3294     compiler bytes allocated -1.3%
        T12707    compiler bytes allocated -1.3%
        T13056    compiler bytes allocated -2.2%
    
    Metric Decrease:
        T3064
        T3294
        T12707
        T13056
Loading