Mon Dec  7 00:32:46 PST 2009  [email protected]
  * Fix a nasty (and long-standing) FloatOut performance bug
  Ignore-this: a64b98992fa4ced434d1edf0b89842ec
  
  The effect was that, in deeply-nested applications, FloatOut would
  take quadratic time.  A good example was compiling 
      programs/barton-mangler-bug/Expected.hs
  in which FloatOut had a visible pause of a couple of seconds!
  Profiling showed that 40% of the entire compile time was being
  consumbed by the single function partitionByMajorLevel.
  
  The bug was that the floating bindings (type FloatBinds) was kept
  as a list, which was partitioned at each binding site.  In programs
  with deeply nested lists, such as
         e1 : e2 : e3 : .... : e5000 : []
  this led to quadratic behaviour.
  
  The solution is to use a proper finite-map representation;
  see the new definition of FloatBinds near the bottom of FloatOut.

    M ./compiler/simplCore/FloatOut.lhs -76 +126

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091207083246-1287e-bbd45bfecfa03ccbd39f61fa21961bb01c3e8c63.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to