cvs commit: fptools/ghc/lib/std PrelIO.hsc

Simon Marlow simonmar@glass.cse.ogi.edu
Mon, 17 Sep 2001 09:21:41 -0700


simonmar    2001/09/17 09:21:41 PDT

  Modified files:
    ghc/lib/std          PrelIO.hsc 
  Log:
  Subvert GHC's full-laziness optimisation by explicitly lambda-lifting
  a local lambda expression to the top level, and exporting it to ensure
  it doesn't get inlined.  Without this hack, full-laziness will float
  out several subexpressions, which turns out to be a pessimisation in
  this case.
  
  This is worth about 20% in hPutStr performance, so we now beat the old
  I/O library on 'cat' ;-)
  
  I'd like to MERGE TO STABLE this, but 5.02 is imminent so it might
  have to wait until 5.02.1.
  
  Revision  Changes    Path
  1.14      +19 -6     fptools/ghc/lib/std/PrelIO.hsc