[GHC] #8905: Function arguments are always spilled/reloaded if scrutinee is already in WHNF
GHC
ghc-devs at haskell.org
Mon Mar 17 21:16:21 UTC 2014
#8905: Function arguments are always spilled/reloaded if scrutinee is already in
WHNF
--------------------------------------------+------------------------------
Reporter: tibbe | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime performance bug | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by tibbe):
Here are the nofib results on my machine
{{{
$ nofib-analyse/nofib-analyse spill.log no-spill.log | head -n 150
NoFib Results
--------------------------------------------------------------------------------
Program Size Allocs Runtime Elapsed TotalMem
--------------------------------------------------------------------------------
anna +2.2% 0.0% 0.07 0.08 0.0%
ansi 0.0% 0.0% 0.00 0.00 0.0%
atom 0.0% 0.0% +7.9% +6.1% 0.0%
awards 0.0% 0.0% 0.00 0.00 0.0%
banner 0.0% 0.0% 0.00 0.00 0.0%
bernouilli 0.0% 0.0% 0.11 0.12 0.0%
binary-trees 0.0% 0.0% -14.8% -15.1% 0.0%
boyer 0.0% 0.0% 0.02 0.03 0.0%
boyer2 +0.2% 0.0% 0.00 0.00 0.0%
bspt +1.7% 0.0% 0.00 0.01 0.0%
cacheprof +0.5% -0.0% +11.8% +12.7% +5.5%
calendar +0.1% 0.0% 0.00 0.00 0.0%
cichelli +0.1% 0.0% 0.05 0.05 0.0%
circsim +0.2% 0.0% +15.0% +15.8% 0.0%
clausify 0.0% 0.0% 0.02 0.03 0.0%
comp_lab_zift +0.2% 0.0% 0.12 0.13 0.0%
compress +0.1% 0.0% 0.11 0.12 0.0%
compress2 +0.6% 0.0% 0.10 0.12 0.0%
constraints +0.1% 0.0% +9.4% +9.4% 0.0%
cryptarithm1 0.0% 0.0% +19.2% +18.4% 0.0%
cryptarithm2 +0.1% 0.0% 0.00 0.01 0.0%
cse 0.0% 0.0% 0.00 0.00 0.0%
eliza 0.0% 0.0% 0.00 0.00 0.0%
event +0.1% 0.0% 0.09 0.10 0.0%
exp3_8 0.0% 0.0% 0.15 0.16 0.0%
expert +0.2% 0.0% 0.00 0.00 0.0%
fannkuch-redux +0.1% 0.0% -7.6% -7.3% 0.0%
fasta 0.0% 0.0% -4.5% -4.2% 0.0%
fem +1.0% 0.0% 0.01 0.02 0.0%
fft +0.1% 0.0% 0.02 0.03 0.0%
fft2 +0.1% 0.0% 0.03 0.03 0.0%
fibheaps +0.2% 0.0% 0.02 0.02 0.0%
fish +0.1% 0.0% 0.01 0.01 0.0%
fluid +2.5% 0.0% 0.00 0.01 0.0%
fulsom +0.8% 0.0% 0.16 0.18 0.0%
gamteb +0.3% 0.0% 0.02 0.03 0.0%
gcd 0.0% 0.0% 0.02 0.02 0.0%
gen_regexps 0.0% 0.0% 0.00 0.00 0.0%
genfft 0.0% 0.0% 0.02 0.02 0.0%
gg +0.5% 0.0% 0.00 0.01 0.0%
grep +0.3% 0.0% 0.00 0.00 0.0%
hidden +0.5% 0.0% +1.0% -0.0% 0.0%
hpg +0.3% 0.0% 0.04 0.11 0.0%
ida +0.2% 0.0% 0.06 0.06 0.0%
infer +0.2% 0.0% 0.03 0.04 0.0%
integer 0.0% 0.0% +5.6% +5.7% 0.0%
integrate 0.0% 0.0% 0.06 0.09 0.0%
k-nucleotide +0.2% 0.0% -4.6% -4.8% 0.0%
kahan 0.0% 0.0% 0.17 0.18 0.0%
knights +0.3% 0.0% 0.00 0.00 0.0%
lcss 0.0% -0.0% +2.9% +2.6% 0.0%
life 0.0% 0.0% 0.17 0.17 0.0%
lift +0.3% 0.0% 0.00 0.00 0.0%
listcompr 0.0% 0.0% 0.04 0.05 0.0%
listcopy 0.0% 0.0% 0.05 0.06 0.0%
maillist 0.0% +0.0% 0.03 0.17 +2.2%
mandel 0.0% 0.0% 0.03 0.04 0.0%
mandel2 +0.1% 0.0% 0.00 0.00 0.0%
minimax +0.1% 0.0% 0.00 0.00 0.0%
mkhprog +0.1% 0.0% 0.00 0.00 0.0%
multiplier +0.1% 0.0% 0.07 0.08 0.0%
n-body 0.0% 0.0% -6.3% -6.2% 0.0%
nucleic2 +1.8% 0.0% 0.04 0.05 0.0%
para +0.5% 0.0% 0.20 0.22 0.0%
paraffins +0.1% 0.0% 0.07 0.09 0.0%
parser +1.0% 0.0% 0.02 0.02 0.0%
parstof +0.4% 0.0% 0.00 0.01 0.0%
pic +0.5% 0.0% 0.00 0.01 0.0%
pidigits 0.0% 0.0% -6.3% -5.5% 0.0%
power +0.1% 0.0% +7.7% +7.4% +1.8%
pretty 0.0% 0.0% 0.00 0.00 0.0%
primes 0.0% 0.0% 0.04 0.04 0.0%
primetest 0.0% 0.0% 0.06 0.07 0.0%
prolog +0.2% 0.0% 0.00 0.00 0.0%
puzzle +0.3% 0.0% 0.09 0.13 0.0%
queens 0.0% 0.0% 0.01 0.01 0.0%
reptile +0.5% 0.0% 0.00 0.01 0.0%
reverse-complem +0.1% 0.0% 0.05 0.08 0.0%
rewrite +0.2% 0.0% 0.01 0.01 0.0%
rfib 0.0% 0.0% 0.01 0.01 0.0%
rsa 0.0% 0.0% 0.01 0.01 0.0%
scc 0.0% 0.0% 0.00 0.00 0.0%
sched +0.1% 0.0% 0.01 0.01 0.0%
scs +1.8% 0.0% -10.4% -13.1% 0.0%
simple +2.9% 0.0% 0.15 0.17 0.0%
solid +0.1% 0.0% 0.09 0.11 0.0%
sorting +0.1% 0.0% 0.00 0.00 0.0%
spectral-norm 0.0% 0.0% +3.5% +3.1% 0.0%
sphere +0.6% 0.0% 0.02 0.03 0.0%
symalg +0.2% 0.0% 0.00 0.00 0.0%
tak 0.0% 0.0% 0.01 0.01 0.0%
transform +0.4% 0.0% 0.22 +12.6% 0.0%
treejoin +0.1% 0.0% 0.09 0.11 0.0%
typecheck +0.1% 0.0% 0.14 0.15 0.0%
veritas +1.9% 0.0% 0.00 0.01 0.0%
wang +0.1% 0.0% 0.07 0.09 0.0%
wave4main +0.1% 0.0% 0.14 0.16 0.0%
wheel-sieve1 +0.1% 0.0% +3.8% +4.5% 0.0%
wheel-sieve2 0.0% 0.0% 0.12 0.14 0.0%
x2n1 0.0% 0.0% 0.00 0.00 0.0%
--------------------------------------------------------------------------------
Min 0.0% -0.0% -14.8% -15.1% 0.0%
Max +2.9% +0.0% +19.2% +18.4% +5.5%
Geometric Mean +0.3% -0.0% +1.5% +1.8% +0.1%
}}}
A more detailed analysis of the results would be interesting. For example,
I note that programs that are already heavily tuned (from the shootout
suite) get faster, while some more "traditional" benchmarks get slower.
However, given that it's a slight regressions on average on nofib, I think
this isn't something we should go ahead with without further
investigation.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8905#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list