Skip to content
  • Simon Marlow's avatar
    Second attempt to fix sizeExpr · a47b62cb
    Simon Marlow authored
    Summary:
    Background:
    * sizeExpr was calculating expressions like ((e `cast` T) x) wrongly
    * Fixing it caused regressions in compile performance, and one nofib
      program (k-nucleotide)
    
    I managed to fix the source of the compiler regressions.  I think it was
    due to traceTc not being inlined, which I fixed in a more robust way by
    putting an export list on TcRnMonad.
    
    The k-nucleotide regression is more difficult.  I don't think anything
    is actually going wrong, but this program has been highly tuned and is
    quite sensitive to changing in inlining behaviour.  I managed to recover
    most of the performance by manual lambda-lifting which makes it a bit
    less fragile, but the end result was a bit slower.  I don't think this
    is disastrous, the program is pretty horrible to begin with and we could
    probably make a faster one by starting from scratch.
    
    Test Plan: validate, nofib
    
    Reviewers: simonpj, bgamari, niteria, austin, erikd
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2338
    
    GHC Trac Issues: #11564
    a47b62cb