[MLton-devel] cvs commit: overflow detection in C codegen

Stephen Weeks MLton@mlton.org
Thu, 21 Nov 2002 20:51:07 -0800


Here are the benchmarks for the various arithmetic overflow detection
approaches, compiled with gcc 3.2 with the usual flags (but no
-mcpu=i686).  The numbers are pretty good.  INT_TEST is as good or
better than INT_LONG.  And it's getting closer to the native codegen
(a lot better than the numbers Matthew sent a little while back).
Furthermore, comparing MLton2 and MLton3 shows that the hit is often
due to costs other than overflow detection.

MLton0 -- mlton -native true
MLton1 -- mlton -native false -DINT_NO_CHECK
MLton2 -- mlton -native false -DINT_JO
MLton3 -- mlton -native false -DINT_TEST
MLton4 -- mlton -native false -DINT_LONG

run time ratio
benchmark         MLton1 MLton2 MLton3 MLton4
barnes-hut          1.19   1.19   1.19   1.19
boyer               1.16   1.15   1.16   1.15
checksum            0.90   0.95   1.33   1.39
count-graphs        1.56   1.62   1.59   1.63
DLXSimulator        1.04   1.04   1.04   1.05
fft                 1.03   1.02   1.04   1.02
fib                 1.63   1.78   2.06   2.33
hamlet              1.75   1.72   1.72   1.81
imp-for             1.20   1.20   1.20   2.36
knuth-bendix        1.41   1.42   1.56   1.55
lexgen              1.62   1.48   1.45   1.52
life                1.32   1.36   1.34   1.48
logic               1.22   1.21   1.21   1.51
mandelbrot          0.92   0.93   1.14   1.12
matrix-multiply     1.00   1.13   1.12   1.27
md5                 2.05   2.16   2.36   2.49
merge               1.11   1.11   1.13   1.11
mlyacc              1.16   1.15   1.19   1.19
model-elimination   1.33   1.33   1.35   1.37
mpuz                1.28   1.41   2.03   2.16
nucleic             1.13   1.13   1.13   1.13
peek                1.00   1.00   2.00   5.25
psdes-random        1.00   1.07   1.07   1.54
ratio-regions       1.17   1.17   1.23   1.31
ray                 1.29   1.31   1.37   1.41
raytrace            1.25   1.24   1.45   1.45
simple              1.47   1.46   1.68   1.79
smith-normal-form   1.00   1.00   1.00   1.00
tailfib             1.19   1.47   3.45   3.87
tak                 1.18   1.21   1.13   1.34
tensor              1.05   1.34   1.90   7.15
tsp                 1.15   1.15   1.16   1.18
tyan                1.26   1.25   1.34   1.31
vector-concat       0.87   0.93   1.42   1.44
vector-rev          1.02   1.00   1.20   1.47
vliw                1.44   1.43   1.50   1.52
wc-input1           1.72   1.58   1.78   1.84
wc-scanStream       1.77   1.72   1.82   1.96
zebra               1.12   1.11   1.12   1.17
zern                1.08   1.09   1.22   1.21

size
benchmark            MLton0    MLton1    MLton2    MLton3    MLton4
barnes-hut          103,536   119,332   119,652   122,852   121,828
boyer               140,985   223,081   223,145   223,225   223,145
checksum             44,201    44,745    44,809    44,969    44,953
count-graphs         64,201    77,977    78,521    79,625    85,545
DLXSimulator        101,778   144,498   144,946   151,074   158,018
fft                  53,213    59,489    59,857    61,473    62,177
fib                  44,265    45,065    45,129    45,385    45,289
hamlet            1,228,492 2,013,484 2,025,148 2,264,764 2,274,204
imp-for              44,185    44,537    44,601    44,537    44,713
knuth-bendix         86,722   123,314   123,650   129,154   129,122
lexgen              173,273   278,921   279,513   289,353   319,337
life                 62,665    78,265    78,505    80,329    86,489
logic               104,345   137,753   137,961   139,705   171,065
mandelbrot           44,281    44,281    44,393    44,777    44,569
matrix-multiply      44,777    45,305    45,385    45,609    45,609
md5                  53,314    61,634    62,242    66,114    69,170
merge                45,545    46,889    46,985    47,257    47,177
mlyacc              539,897   888,601   890,473   951,273   966,361
model-elimination   636,352 1,037,616 1,041,104 1,137,872 1,201,680
mpuz                 48,425    51,225    51,561    54,393    53,865
nucleic             191,409   170,821   170,885   170,997   170,869
peek                 52,306    57,650    58,082    59,650    58,962
psdes-random         45,337    46,585    46,665    46,745    46,745
ratio-regions        62,585    71,513    72,441    81,193    84,441
ray                 104,348   144,764   145,036   159,596   164,988
raytrace            278,585   360,393   361,001   421,545   419,369
simple              201,597   388,033   390,961   397,537   428,145
smith-normal-form   181,572   275,292   275,676   279,772   283,420
tailfib              43,993    44,345    44,425    44,697    44,601
tak                  44,441    45,177    45,289    45,465    45,369
tensor              104,123   116,635   119,931   132,635   133,019
tsp                  59,298    68,120    68,344    71,304    70,824
tyan                107,426   154,082   153,954   176,690   174,962
vector-concat        44,729    45,433    45,513    45,913    45,785
vector-rev           44,553    45,129    45,177    45,753    45,561
vliw                324,453   572,453   573,509   602,901   630,773
wc-input1            66,265    82,537    81,593    84,969    84,105
wc-scanStream        66,713    83,417    82,297    85,721    84,905
zebra               143,242   191,138   192,178   194,962   209,698
zern                 50,972    55,888    56,016    56,496    56,416



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel