MLton 20051202 Performance
Home  Index  
The [WWW]Computer Language Shootout has a [WWW]performance comparison of many different languages, including [WWW]MLton.

This page compares the performance of the following SML compilers on a range of benchmarks.

There are tables for run time, compile time, and code size.

Setup

All benchmarks were compiled and run on a 1.6 GHz dual Athlon with 4G of RAM. The benchmarks were compiled with the default settings for all the compilers, except for Moscow ML, which was passed the -orthodox -standalone -toplevel switches. The Poly/ML executables were produced by useing the file, followed by a PolyML.commit. The SML/NJ executables were produced by wrapping the entire program in a local declaration whose body performs an SMLofNJ.exportFn.

For more details, or if you want to run the benchmarks yourself, please see the benchmark directory of the MLton Sources.

All of the benchmarks are available for download from this page. Some of the benchmarks were obtained from the SML/NJ benchmark suite. Some of the benchmarks expect certain input files to exist in the DATA subdirectory.

Run-time ratio

The following table gives the ratio of the run time of each benchmark when compiled by another compiler to the run time when compiled by MLton. That is, the larger the number, the slower the generated code runs. A number larger than one indicates that the corresponding compiler produces code that runs more slowly than MLton. If an entry is *, that means that the corresponding compiler failed to compile the benchmark or that the benchmark failed to run.

benchmark MLton ML-Kit Moscow-ML Poly/ML SML/NJ
[WWW]barnes-hut 1.0 * * * 1.1
[WWW]boyer 1.0 * 9.0 2.3 3.0
[WWW]checksum 1.0 * * * *
[WWW]count-graphs 1.0 7.6 44.6 7.8 2.9
[WWW]DLXSimulator 1.0 * * * *
[WWW]fft 1.0 2.7 * 46.4 1.0
[WWW]fib 1.0 1.3 5.4 1.0 1.3
[WWW]flat-array 1.0 1.4 10.8 130.1 4.2
[WWW]hamlet 1.0 * * * 2.2
[WWW]imp-for 1.0 4.2 66.1 10.7 6.0
[WWW]knuth-bendix 1.0 * 18.6 8.5 3.6
[WWW]lexgen 1.0 2.2 6.2 2.1 1.7
[WWW]life 1.0 2.8 25.9 10.2 1.5
[WWW]logic 1.0 * 6.6 1.5 1.1
[WWW]mandelbrot 1.0 13.9 45.5 71.3 1.5
[WWW]matrix-multiply 1.0 5.3 49.7 16.0 5.2
[WWW]md5 1.0 * * * *
[WWW]merge 1.0 * * 1.5 5.8
[WWW]mlyacc 1.0 * 6.2 1.3 1.4
[WWW]model-elimination 1.0 * * * 1.7
[WWW]mpuz 1.0 2.5 53.3 5.5 3.4
[WWW]nucleic 1.0 * * 22.9 0.6
[WWW]output1 1.0 20.9 33.2 3.1 7.2
[WWW]peek 1.0 21.5 127.2 20.8 15.7
[WWW]psdes-random 1.0 7.7 * * 3.4
[WWW]ratio-regions 1.0 2.2 25.7 2.8 4.8
[WWW]ray 1.0 * 22.4 35.8 1.4
[WWW]raytrace 1.0 * * * 2.8
[WWW]simple 1.0 1.9 14.4 7.4 1.6
[WWW]smith-normal-form 1.0 * * * >3000
[WWW]tailfib 1.0 1.3 35.5 2.4 2.4
[WWW]tak 1.0 2.4 9.6 0.8 1.6
[WWW]tensor 1.0 * * * 15.6
[WWW]tsp 1.0 3.4 25.9 * 56.7
[WWW]tyan 1.0 * 14.0 1.6 0.9
[WWW]vector-concat 1.0 1.7 16.4 1.7 9.6
[WWW]vector-rev 1.0 2.1 21.8 3.0 73.0
[WWW]vliw 1.0 * * * 1.3
[WWW]wc-input1 1.0 14.8 * 6.6 8.7
[WWW]wc-scanStream 1.0 21.4 * 352.5 9.4
[WWW]zebra 1.0 7.0 30.6 7.2 8.6
[WWW]zern 1.0 * * * 2.8

Note: for SML/NJ, the smith-normal-form benchmark was killed after running for over 60,000 seconds.

Compile time

The following table gives the compile time of each benchmark in seconds. A * in an entry means that the compiler failed to compile the benchmark.

benchmark MLton ML-Kit Moscow-ML Poly/ML SML/NJ
[WWW]barnes-hut 7.06 * * * 1.09
[WWW]boyer 8.08 9.73 0.39 0.14 3.46
[WWW]checksum 4.96 * * * *
[WWW]count-graphs 5.73 2.17 0.13 0.08 0.72
[WWW]DLXSimulator 7.67 * * * *
[WWW]fft 5.00 1.54 0.12 0.06 0.66
[WWW]fib 4.67 0.91 0.04 0.03 0.16
[WWW]flat-array 4.60 0.91 0.03 0.02 0.18
[WWW]hamlet 46.86 * * * 53.12
[WWW]imp-for 4.63 0.99 0.04 0.02 0.19
[WWW]knuth-bendix 6.12 4.21 0.18 0.15 1.36
[WWW]lexgen 9.09 6.47 0.38 0.33 3.22
[WWW]life 5.09 2.43 0.09 0.07 0.53
[WWW]logic 6.52 4.77 0.21 0.11 1.43
[WWW]mandelbrot 4.63 0.97 0.05 0.03 0.23
[WWW]matrix-multiply 4.68 1.03 0.06 0.03 0.26
[WWW]md5 5.26 * * * *
[WWW]merge 4.64 0.93 0.07 0.01 0.24
[WWW]mlyacc 22.42 36.94 3.63 1.45 14.63
[WWW]model-elimination 23.07 * * * 24.06
[WWW]mpuz 4.75 1.27 0.06 0.04 0.35
[WWW]nucleic 65.13 31.26 * 0.48 2.56
[WWW]output1 5.28 0.94 0.04 0.02 0.17
[WWW]peek 5.19 0.97 0.04 0.03 0.19
[WWW]psdes-random 4.65 0.99 * * 65.07
[WWW]ratio-regions 5.73 3.80 0.19 0.13 1.38
[WWW]ray 7.94 3.21 0.13 0.10 0.81
[WWW]raytrace 12.32 * * * 5.16
[WWW]simple 10.03 11.79 0.43 0.27 3.19
[WWW]smith-normal-form 8.45 * * 0.13 2.39
[WWW]tailfib 4.59 0.92 0.04 0.02 0.18
[WWW]tak 4.60 0.89 0.04 0.01 0.17
[WWW]tensor 7.34 * * * 2.06
[WWW]tsp 5.51 2.40 0.14 * 0.51
[WWW]tyan 7.38 5.87 0.27 0.20 1.97
[WWW]vector-concat 4.66 0.91 0.04 0.03 0.19
[WWW]vector-rev 4.62 0.93 0.04 0.02 0.18
[WWW]vliw 16.68 * * * 13.44
[WWW]wc-input1 5.86 0.96 0.05 0.02 0.21
[WWW]wc-scanStream 6.10 0.96 0.05 0.03 0.21
[WWW]zebra 7.01 2.57 0.09 0.06 0.64
[WWW]zern 5.21 * * * 0.50

Code size

The following table gives the code size of each benchmark in bytes. The size for MLton and the ML Kit is the sum of text and data for the standalone executable as reported by size. The size for Moscow ML is the size in bytes of the executable a.out. The size for Poly/ML is the difference in size of the database before the session start and after the commit. The size for SML/NJ is the size of the heap file created by exportFn and does not include the size of the SML/NJ runtime system (approximately 100K). A * in an entry means that the compiler failed to compile the benchmark.

benchmark MLton ML-Kit Moscow-ML Poly/ML SML/NJ
[WWW]barnes-hut 157,305 * * * 422,976
[WWW]boyer 154,559 156,737 116,300 122,880 516,136
[WWW]checksum 70,489 * * * *
[WWW]count-graphs 81,555 88,601 84,613 98,304 450,680
[WWW]DLXSimulator 185,925 * * * *
[WWW]fft 79,955 85,433 84,046 65,536 424,016
[WWW]fib 64,227 16,101 79,892 49,152 405,248
[WWW]flat-array 64,271 24,413 80,034 49,152 416,528
[WWW]hamlet 1,301,021 * * * 1,411,336
[WWW]imp-for 64,115 16,869 80,040 57,344 390,184
[WWW]knuth-bendix 160,857 97,177 88,439 180,224 420,904
[WWW]lexgen 258,994 215,729 104,883 196,608 491,584
[WWW]life 81,591 79,253 83,390 65,536 404,520
[WWW]logic 125,587 115,217 87,251 114,688 430,120
[WWW]mandelbrot 64,175 77,905 81,340 57,344 394,280
[WWW]matrix-multiply 65,435 96,137 82,417 57,344 422,968
[WWW]md5 129,249 * * * *
[WWW]merge 65,835 25,601 80,090 49,152 390,192
[WWW]mlyacc 558,018 502,081 148,286 2,850,816 801,904
[WWW]model-elimination 686,584 * * * 1,028,344
[WWW]mpuz 66,895 75,925 82,382 81,920 398,376
[WWW]nucleic 218,271 268,237 * 221,184 477,240
[WWW]output1 139,243 61,465 80,187 49,152 405,248
[WWW]peek 133,953 60,829 81,621 57,344 409,392
[WWW]psdes-random 64,851 25,529 * * 411,704
[WWW]ratio-regions 89,779 98,489 87,482 73,728 433,208
[WWW]ray 239,069 112,309 89,859 147,456 483,472
[WWW]raytrace 321,782 * * * 605,360
[WWW]simple 276,608 202,561 94,396 475,136 746,600
[WWW]smith-normal-form 239,321 * * 131,072 547,984
[WWW]tailfib 63,899 16,301 79,943 57,344 405,248
[WWW]tak 64,311 16,093 79,908 57,344 401,152
[WWW]tensor 155,108 * * * 440,432
[WWW]tsp 133,549 99,497 86,146 * 414,784
[WWW]tyan 192,229 146,101 91,586 196,608 467,032
[WWW]vector-concat 65,483 24,517 80,194 49,152 416,528
[WWW]vector-rev 64,735 24,697 80,078 57,344 416,528
[WWW]vliw 445,446 * * * 730,280
[WWW]wc-input1 160,129 132,765 85,771 49,152 394,280
[WWW]wc-scanStream 163,633 133,261 85,947 49,152 407,296
[WWW]zebra 176,181 44,741 83,422 90,112 409,656
[WWW]zern 146,473 * * * 468,120


Last edited on 2005-01-06 04:28:40 by StephenWeeks.