[MLton-devel] first benchmarks with generational gc

Stephen Weeks MLton@mlton.org
Tue, 6 Aug 2002 13:44:20 -0700


I've got a first version of the generational gc working, and thought
I'd send some benchmarks.  Here's a comparison between the 20020728
release of MLton and my current working version, which has a new
switch, -generational {true|false}, that determines whether or not the
runtime uses a generational gc (and whether or not the mutator uses
card marking).

I haven't done much optimization yet, so things are a slower than they
should be.  In particular, the card size is not even yet a hardwired
constant in the runtime, since I want to do some experiments with
various card sizes.

What the numbers below do show is

* The new collector code adds about 17K of code size.
* The code size impact of card marking in the mutator is negligible.
* The run-time impact of generational gc was not very much, except a
  couple of major slowdowns (DLXSimulator, tsp) and one major speedup
  (nucleic).

As further evidence of the small code size for card marking, here are
the sizes of mlton when compiled with (7,367,841) and without
(7,278,289) card marking. 

Self-compiles are not entirely reliable yet, so there are still some
bugs left.  And there's obviously lots more tuning and experiments to
do.

MLton0 -- /usr/local/bin/mlton  (20020728)
MLton1 -- mlton -generational false
MLton2 -- mlton -generational true
compile time
benchmark         MLton0 MLton1 MLton2
barnes-hut           1.6    1.9    1.9
boyer                3.2    3.6    3.7
checksum             0.4    0.4    0.4
count-graphs         1.0    1.1    1.1
DLXSimulator         2.8    3.5    3.5
fft                  0.8    0.9    0.8
fib                  0.3    0.3    0.3
hamlet              29.2   37.8   37.8
imp-for              0.3    0.4    0.4
knuth-bendix         1.2    1.4    1.4
lexgen               3.3    3.9    3.9
life                 0.7    0.8    0.8
logic                1.7    1.9    1.9
mandelbrot           0.4    0.4    0.4
matrix-multiply      0.4    0.5    0.5
md5                  0.7    0.8    0.8
merge                0.4    0.4    0.4
mlyacc              13.1   16.6   16.6
mpuz                 0.5    0.6    0.6
nucleic              2.6    3.3    3.3
peek                 0.6    0.6    0.6
psdes-random         0.4    0.4    0.4
ratio-regions        1.4    1.7    1.7
ray                  2.0    2.4    2.4
raytrace             6.1    7.2    7.2
simple               4.1    5.1    5.1
smith-normal-form    4.2    5.0    5.0
tailfib              0.3    0.4    0.4
tak                  0.3    0.4    0.4
tensor               1.8    2.4    2.4
tsp                  0.8    0.9    1.0
tyan                 2.1    2.7    2.7
vector-concat        0.4    0.5    0.5
vector-rev           0.4    0.4    0.4
vliw                 6.9    8.7    8.7
wc-input1            0.9    1.0    1.0
wc-scanStream        1.0    1.1    1.1
zebra                3.7    4.2    4.2
zern                 0.6    0.7    0.7
run time
benchmark         MLton0 MLton1 MLton2
barnes-hut           1.8    1.8    1.7
boyer                2.8    2.6    2.8
checksum             1.6    1.6    1.6
count-graphs         1.8    1.9    1.9
DLXSimulator        10.2   10.1   20.1
fft                  8.8    8.9    7.9
fib                  1.5    1.5    1.5
hamlet               4.0    3.8    3.6
imp-for              3.8    3.7    3.7
knuth-bendix         3.3    3.4    3.7
lexgen               7.0    6.8    6.2
life                 2.8    2.8    3.4
logic               10.0    9.8    8.9
mandelbrot           3.5    3.5    3.5
matrix-multiply      1.2    1.2    1.2
md5                  1.0    1.0    1.0
merge               29.9   30.1   29.4
mlyacc               6.0    6.0    5.4
mpuz                 2.5    2.5    2.5
nucleic              4.4    4.3    2.5
peek                 0.4    0.4    0.4
psdes-random         1.8    1.8    1.8
ratio-regions        5.1    5.1    5.7
ray                  1.6    1.6    1.6
raytrace             2.3    2.3    2.2
simple               3.2    3.2    3.2
smith-normal-form    0.4    0.4    0.3
tailfib              6.5    6.5    6.5
tak                  4.3    4.3    4.3
tensor               1.6    1.6    1.6
tsp                  3.1    3.1    5.4
tyan                 9.3    8.9    8.4
vector-concat        1.5    1.5    1.4
vector-rev           2.5    2.5    2.4
vliw                 3.3    3.2    3.0
wc-input1            1.3    1.3    1.3
wc-scanStream        1.5    1.6    1.4
zebra                1.0    1.0    1.1
zern                20.5   20.5   16.8
run time ratio
benchmark         MLton1 MLton2
barnes-hut           1.0    0.9
boyer                0.9    1.0
checksum             1.0    1.0
count-graphs         1.1    1.1
DLXSimulator         1.0    2.0
fft                  1.0    0.9
fib                  1.0    1.0
hamlet               1.0    0.9
imp-for              1.0    1.0
knuth-bendix         1.0    1.1
lexgen               1.0    0.9
life                 1.0    1.2
logic                1.0    0.9
mandelbrot           1.0    1.0
matrix-multiply      1.0    1.1
md5                  1.0    1.0
merge                1.0    1.0
mlyacc               1.0    0.9
mpuz                 1.0    1.0
nucleic              1.0    0.6
peek                 1.0    1.0
psdes-random         1.0    1.0
ratio-regions        1.0    1.1
ray                  1.0    1.0
raytrace             1.0    1.0
simple               1.0    1.0
smith-normal-form    1.0    0.9
tailfib              1.0    1.0
tak                  1.0    1.0
tensor               1.0    1.0
tsp                  1.0    1.7
tyan                 1.0    0.9
vector-concat        1.0    0.9
vector-rev           1.0    1.0
vliw                 1.0    0.9
wc-input1            1.0    1.0
wc-scanStream        1.0    0.9
zebra                1.0    1.1
zern                 1.0    0.8
size
benchmark            MLton0    MLton1    MLton2
barnes-hut           61,736    78,920    79,208
boyer               124,315   141,467   143,675
checksum             30,947    48,099    48,099
count-graphs         50,499    67,651    67,811
DLXSimulator         93,550   110,670   110,830
fft                  40,007    57,159    57,159
fib                  30,979    48,099    48,099
hamlet            1,090,668 1,107,788 1,109,420
imp-for              31,011    48,131    48,131
knuth-bendix         70,620    87,740    87,772
lexgen              153,225   170,377   171,017
life                 47,011    64,163    64,163
logic                87,571   104,723   105,043
mandelbrot           31,043    48,195    48,195
matrix-multiply      31,491    48,611    48,611
md5                  39,676    56,796    56,828
merge                32,195    49,347    49,347
mlyacc              466,313   483,465   485,257
mpuz                 34,979    52,131    52,131
nucleic              69,667    86,819    86,819
peek                 38,620    55,740    55,772
psdes-random         32,003    49,155    49,155
ratio-regions        49,283    66,435    66,627
ray                  88,732   105,884   106,332
raytrace            237,689   254,841   255,289
simple              185,607   202,727   202,791
smith-normal-form   139,740   156,924   157,212
tailfib              30,691    47,843    47,843
tak                  31,107    48,259    48,259
tensor               60,675    77,859    77,923
tsp                  45,084    62,204    62,940
tyan                 89,036   106,156   107,308
vector-concat        31,459    48,611    48,611
vector-rev           31,331    48,451    48,451
vliw                295,941   313,093   315,077
wc-input1            53,913    71,033    71,193
wc-scanStream        54,585    71,705    71,897
zebra               116,564   133,684   134,452
zern                 37,510    54,630    54,630


-------------------------------------------------------
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