Mon Dec 14 05:46:47 PST 2009 [email protected]
* Tidy up computation of result discounts in CoreUnfold
Ignore-this: 351076027f8e9cb8aa44db6d60798c47
Mostly this patch is a tidy-up, but it did reveal one inconsistency
that I fixed. When computing result discounts for case expressions,
we were *adding* result-discounts for cases on non-arguments, but
*picking the one for the max-size branch* for arguments. I think you
could argue the toss, but it seems neater (and the code is nicer)
to be consistent (ie always add). See Note [addAltSize result discounts].
The nofib results seem fine
Program Size Allocs Runtime Elapsed
--------------------------------------------------------------------------------
boyer -0.8% -4.8% 0.06 0.07
sphere -0.7% -2.5% 0.15 0.16
--------------------------------------------------------------------------------
Min -0.8% -4.8% -19.1% -24.8%
Max -0.5% +0.0% +3.4% +127.1%
Geometric Mean -0.7% -0.1% -4.3% -1.3%
The +127% elapsed is a timing error; I re-ran the same binary and it's
unchanged from the baseline.
M ./compiler/coreSyn/CoreUnfold.lhs -26 +40
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20091214134647-1287e-0a4758097deea3f1a3ca45d36ca2996dbdb3311c.gz
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc