
#1600: Optimisation: CPR the results of IO -------------------------------------+------------------------------------- Reporter: simonmar | Owner: nomeata Type: task | Status: new Priority: lowest | Milestone: 7.6.2 Component: Compiler | Version: 6.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: Runtime | Difficulty: Moderate (less performance bug | than a day) Test Case: | Blocked By: Blocking: | Related Tickets: #8598 -------------------------------------+------------------------------------- Comment (by nomeata): New numbers, after uprooting a bug where things unrelated to CPR (namely things alrady returning an unboxed tuple, with nothing to be CPRed inside) would suddenly get an `INLINE` flag, including some thunks. Finally a measurable positive change in the geometric mean! {{{ -------------------------------------------------------------------------------- Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- ansi +0.3% -0.1% 0.00 0.00 +0.0% compress2 +0.6% -0.8% 0.11 0.11 -8.0% fibheaps +0.3% -0.3% 0.03 0.03 +0.0% gamteb +0.4% -0.2% 0.04 0.04 +0.0% grep +0.3% -0.1% 0.00 0.00 +0.0% hpg +0.4% -3.0% 0.13 0.13 +0.0% infer +0.3% -1.2% 0.03 0.03 +0.0% k-nucleotide +0.2% -6.9% -1.6% -1.4% +0.0% maillist +0.4% -0.8% 0.04 0.04 +0.8% mkhprog +0.4% -0.3% 0.00 0.00 +0.0% pic +0.3% -0.7% 0.00 0.00 +0.0% pretty +0.4% -0.1% 0.00 0.00 +0.0% rfib +0.3% -0.2% 0.01 0.01 +0.0% scc +0.3% -0.1% 0.00 0.00 +0.0% spectral-norm +0.4% -0.1% +0.3% +0.3% +0.0% sphere +0.4% -4.7% 0.04 0.04 +0.0% symalg +0.3% -0.1% 0.01 0.01 +0.0% tak +0.3% -0.3% 0.01 0.01 +0.0% transform +0.3% +0.2% -2.2% -2.2% +0.0% -------------------------------------------------------------------------------- Min +0.2% -6.9% -5.3% -28.2% -11.2% Max +0.7% +0.2% +2.1% +2.1% +50.0% Geometric Mean +0.3% -0.2% -0.8% -2.3% +0.2% }}} Surprisingly to me, the bug fix also fixed a +11% increase in wave4main’s allocations, which I thought were caused by join-point losses. A quick glance into `transform` shows that `f_list_cmp` lost its (non- nested) CPR property, accounting for most of the increase according to ticky. Will investigate tomorrow. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/1600#comment:37 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler