[MLton] two more optimal flatten all algorithms, benchmarks
Lukasz S Ziarek
lziarek@cs.purdue.edu
Tue, 9 Mar 2004 14:52:01 -0500 (EST)
Both of these algorithms still use the flatten all principle, but they try
to minimize coercions by doing them as early as possible. The difference
between the two, is that the second passes both a flat and non flat
representation of a tuple through returns, raises, calls, gotos, etc. The
first passes only flat tuples and does the coercions as the begining of a
block or function. Both uses useless to help remove unecessary variables.
Luke
MLton0 -- /homes/lziarek/mlton/build/bin/mlton -flatten false
MLton1 -- /homes/lziarek/mlton/build/bin/mlton -flatten true
run time ratio
benchmark MLton0 MLton1
barnes-hut 1.00 1.07
boyer 1.00 1.17
checksum 1.00 1.00
count-graphs 1.00 0.91
DLXSimulator 1.00 0.99
fft 1.00 0.97
fib 1.00 0.99
imp-for 1.00 1.10
knuth-bendix 1.00 0.89
lexgen 1.00 0.93
life 1.00 1.07
logic 1.00 1.00
mandelbrot 1.00 1.02
matrix-multiply 1.00 1.00
md5 1.00 0.95
merge 1.00 1.00
mlyacc 1.00 0.93
mpuz 1.00 0.97
nucleic 1.00 3.69
output1 1.00 1.02
peek 1.00 1.00
psdes-random 1.00 0.68
ratio-regions 1.00 0.97
ray 1.00 1.65
raytrace 1.00 1.30
simple 1.00 0.97
smith-normal-form 1.00 1.00
tailfib 1.00 1.00
tak 1.00 1.01
tensor 1.00 1.00
tsp 1.00 1.02
tyan 1.00 0.94
vector-concat 1.00 0.88
vector-rev 1.00 1.00
vliw 1.00 1.14
wc-input1 1.00 0.99
wc-scanStream 1.00 0.99
zebra 1.00 1.14
zern 1.00 0.55
MLton0 -- /homes/lziarek/mlton/build/bin/mlton -flatten false
MLton1 -- /homes/lziarek/mlton/build/bin/mlton -flatten true
run time ratio
benchmark MLton0 MLton1
barnes-hut 1.00 1.35
boyer 1.00 1.05
checksum 1.00 1.00
count-graphs 1.00 0.91
DLXSimulator 1.00 0.99
fft 1.00 0.97
fib 1.00 1.01
imp-for 1.00 1.10
knuth-bendix 1.00 0.84
lexgen 1.00 0.95
life 1.00 1.01
logic 1.00 0.99
mandelbrot 1.00 1.02
matrix-multiply 1.00 1.00
md5 1.00 0.90
merge 1.00 1.00
mlyacc 1.00 0.95
mpuz 1.00 1.03
nucleic 1.00 4.08
output1 1.00 1.02
peek 1.00 1.00
psdes-random 1.00 0.68
ratio-regions 1.00 0.97
ray 1.00 1.66
raytrace 1.00 1.37
simple 1.00 0.96
smith-normal-form 1.00 1.00
tailfib 1.00 1.00
tak 1.00 1.00
tensor 1.00 1.00
tsp 1.00 1.02
tyan 1.00 0.95
vector-concat 1.00 0.94
vector-rev 1.00 0.99
vliw 1.00 1.16
wc-input1 1.00 0.94
wc-scanStream 1.00 1.01
zebra 1.00 1.01
zern 1.00 0.54