[MLton-devel] cvs commit: C codegen cleanup

Stephen Weeks MLton@mlton.org
Wed, 14 May 2003 15:26:13 -0700


Here are the complete benchmarks comparing 20030512 and 20030513
with -native false, the main point of difference being that in
20030512 the stackTop and frontier are C variables, whereas in
20030513 they are gcState offsets.

The worst slowdowns were in fib (1.39) and tak (1.82), where not
having the stackTop in a register really hurts.  Surprisingly enough
there were a few noticeable speedups: peek (0.83), tailfib (0.81), and
wc-input1 (0.54).  Also noticeable are the consistently impressive
speedups using -O2, without too bad of a compile-time hit.  This all
with gcc 2.96.

MLton0 -- mlton-20030512 -native false -cc-opt -O1
MLton1 -- mlton-20030512 -native false -cc-opt -O2
MLton2 -- mlton-20030513 -native false -cc-opt -O1
MLton3 -- mlton-20030513 -native false -cc-opt -O2

run time ratio
benchmark         MLton0 MLton1 MLton2 MLton3
barnes-hut          1.00   0.88   1.06   0.98
boyer               1.00   0.91   1.11   0.98
checksum            1.00   0.86   1.02   0.84
count-graphs        1.00   0.55   1.05   0.77
DLXSimulator        1.00   0.91   1.05   1.02
fft                 1.00   0.94   1.01   0.95
fib                 1.00   0.94   1.39   1.48
hamlet              1.00   0.94   1.18   1.07
imp-for             1.00   0.91   1.10   0.92
knuth-bendix        1.00   0.80   1.17   1.02
lexgen              1.00   0.74   0.93   0.88
life                1.00   0.57   0.86   0.75
logic               1.00   0.96   1.26   1.16
mandelbrot          1.00   1.04   1.02   1.02
matrix-multiply     1.00   0.85   1.13   0.84
md5                 1.00   0.91   1.55   1.36
merge               1.00   0.97   1.01   1.00
mlyacc              1.00   0.97   1.13   1.11
model-elimination   1.00   0.86   1.13   1.00
mpuz                1.00   0.56   1.11   0.77
nucleic             1.00   1.02   1.21   1.19
peek                1.00   0.73   0.83   0.72
psdes-random        1.00   0.52   0.96   0.57
ratio-regions       1.00   0.70   1.05   0.79
ray                 1.00   0.92   1.06   1.09
raytrace            1.00   0.64   1.14   0.94
simple              1.00   0.95   1.15   1.15
smith-normal-form   1.00   1.00   1.00   1.00
tailfib             1.00   0.89   0.81   0.80
tak                 1.00   0.85   1.82   1.54
tensor              1.00   0.80   0.91   0.77
tsp                 1.00   0.90   1.07   1.03
tyan                1.00   0.86   1.14   1.01
vector-concat       1.00   0.85   0.99   0.84
vector-rev          1.00   0.94   1.02   0.95
vliw                1.00   0.85   1.08   0.95
wc-input1           1.00   0.32   0.54   0.34
wc-scanStream       1.00   0.41   1.02   0.33
zebra               1.00   0.95   1.29   1.10
zern                1.00   0.67   0.96   0.67
size
benchmark            MLton0    MLton1    MLton2    MLton3
barnes-hut          141,517   138,509   144,612   140,388
boyer               145,673   143,241   184,441   178,841
checksum             56,217    56,217    56,009    55,625
count-graphs         77,209    75,513    80,233    77,865
DLXSimulator        130,818   124,578   145,234   137,522
fft                  66,305    64,865    66,417    64,913
fib                  55,705    55,513    55,625    55,369
hamlet            1,436,666 1,404,698 1,750,666 1,697,546
imp-for              55,849    55,337    55,673    55,289
knuth-bendix        108,834   103,586   118,802   113,970
lexgen              201,951   191,103   229,103   215,919
life                 75,633    74,225    83,297    80,833
logic               105,961   103,529   128,281   126,265
mandelbrot           55,801    55,385    55,593    55,369
matrix-multiply      56,425    55,913    56,217    55,673
md5                  71,954    69,938    74,338    72,290
merge                57,681    57,201    57,633    57,281
mlyacc              570,287   544,111   677,247   632,223
model-elimination   725,729   695,329   848,401   810,001
mpuz                 62,873    61,785    63,721    62,601
nucleic             138,789   138,437   177,283   175,875
peek                 69,778    67,826    70,786    68,898
psdes-random         56,657    56,145    56,449    56,033
ratio-regions        97,857    80,801    96,913    81,489
ray                 146,866   130,130   145,273   137,753
raytrace            264,119   253,623   297,270   285,878
simple              230,289   223,313   275,256   267,000
smith-normal-form   207,173   205,061   271,637   264,341
tailfib              55,593    55,273    55,449    55,097
tak                  55,833    55,609    55,817    55,529
tensor              139,140   134,980   139,860   135,828
tsp                  79,696    77,168    81,335    80,919
tyan                141,290   133,002   152,346   144,698
vector-concat        57,017    56,601    57,129    56,521
vector-rev           56,073    55,817    56,025    55,609
vliw                441,955   397,603   497,395   461,299
wc-input1            86,959    84,399    89,567    86,079
wc-scanStream        91,007    88,351    94,127    90,223
zebra               146,922   140,746   156,890   146,842
zern                 63,832    62,200    64,200    61,864
compile time
benchmark         MLton0 MLton1 MLton2 MLton3
barnes-hut          4.79   5.78   5.83   6.95
boyer              23.20  26.90  63.30  68.60
checksum            0.87   0.90   0.75   0.85
count-graphs        2.95   3.41   3.33   4.09
DLXSimulator        8.20   9.72  13.67  15.44
fft                 1.86   2.07   1.82   2.04
fib                 0.85   0.89   0.72   0.75
hamlet            146.03 178.84 391.32 465.20
imp-for             0.84   0.87   0.70   0.75
knuth-bendix        5.80   7.17  10.85  14.22
lexgen             13.20  16.41  30.21  35.26
life                2.91   3.36   4.01   4.67
logic               7.44   8.88  24.32  30.52
mandelbrot          0.88   0.94   0.73   0.79
matrix-multiply     0.98   0.96   0.84   0.85
md5                 2.25   2.60   2.52   2.85
merge               0.96   1.06   0.85   0.97
mlyacc             68.59  95.02 206.97 262.87
model-elimination  64.12  79.30 146.37 177.53
mpuz                1.42   1.51   1.33   1.56
nucleic            23.20  25.86  54.92  56.23
peek                1.97   2.28   2.06   2.38
psdes-random        0.88   0.91   0.76   0.81
ratio-regions       4.10   4.91   4.66   5.56
ray                 8.44  10.33  12.05  15.60
raytrace           21.51  26.99  45.33  53.39
simple             17.27  21.36  53.69  62.83
smith-normal-form 102.10 110.34 207.99 236.41
tailfib             0.80   0.86   0.68   0.71
tak                 0.82   0.87   0.71   0.75
tensor              5.03   5.96   6.10   7.06
tsp                 2.75   3.23   2.90   3.44
tyan                8.60  10.61  13.46  16.65
vector-concat       0.92   0.97   0.81   0.86
vector-rev          0.84   0.90   0.72   0.76
vliw               33.43  41.19  67.57  83.29
wc-input1           3.45   4.23   4.18   5.05
wc-scanStream       3.93   4.79   4.98   5.92
zebra               9.15  11.39  13.00  16.67
zern                1.50   1.65   1.41   1.57
run time
benchmark         MLton0 MLton1 MLton2 MLton3
barnes-hut         36.66  32.41  38.89  35.96
boyer              45.43  41.50  50.26  44.65
checksum           73.47  63.38  74.92  61.57
count-graphs       58.65  32.44  61.70  45.33
DLXSimulator       82.15  75.04  86.30  83.48
fft                46.61  43.95  46.85  44.49
fib                50.46  47.65  70.31  74.73
hamlet             46.88  44.15  55.42  50.26
imp-for            48.48  44.11  53.16  44.81
knuth-bendix       43.86  35.28  51.26  44.87
lexgen             74.01  54.73  69.12  65.23
life               80.48  45.66  69.21  60.01
logic              40.12  38.56  50.53  46.70
mandelbrot         37.70  39.02  38.41  38.35
matrix-multiply    40.86  34.55  46.12  34.40
md5               194.72 177.94 301.43 264.63
merge              68.39  66.52  69.03  68.70
mlyacc             37.38  36.27  42.40  41.43
model-elimination  69.16  59.77  78.13  69.07
mpuz               72.42  40.33  80.58  55.48
nucleic            30.71  31.45  37.13  36.48
peek               43.78  31.85  36.37  31.35
psdes-random       30.64  15.79  29.47  17.50
ratio-regions      55.22  38.84  57.94  43.37
ray                23.03  21.13  24.48  25.03
raytrace           40.95  26.06  46.72  38.52
simple             54.20  51.58  62.51  62.23
smith-normal-form  28.78  28.74  28.79  28.75
tailfib            57.90  51.77  46.75  46.27
tak                68.32  58.41 124.05 105.21
tensor             41.25  32.84  37.63  31.73
tsp                45.45  41.02  48.63  46.87
tyan               48.41  41.55  55.37  49.04
vector-concat      77.36  65.80  76.66  65.29
vector-rev         84.04  78.67  85.42  79.42
vliw               44.55  38.05  48.19  42.30
wc-input1         127.63  40.77  69.46  43.51
wc-scanStream      73.02  29.88  74.75  24.02
zebra              49.02  46.62  63.27  53.91
zern               67.88  45.81  64.87  45.45


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel