÷

 Step 1 : Are the SML MLton programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used.

Each chart bar shows, for one unidentified benchmark, how much the fastest SML MLton program used compared to the fastest C++ GNU g++ program.


 Step 2 : Are the SML MLton programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used.

Each table row shows, for one named benchmark, how much the fastest SML MLton program used compared to the fastest C++ GNU g++ program.

 SML MLton used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 binary-trees1/2±
 mandelbrot±±±
 partial-sums±±±
 sum-file±1/51/2
 nsieve±±
 n-body±
 nsieve-bits±
 fasta±±
 fannkuch±±
 spectral-norm±±
 k-nucleotide28×±
 recursive±
 reverse-complement±
 pidigits±±

± read the measurements and then read the program source code.

 Step 3 : Are the SML MLton programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.

For each named benchmark, measurements of the fastest SML MLton program are shown for comparison against measurements of the fastest C++ GNU g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 binary-trees 
SML MLton3.2333,624530  
C++ GNU g++5.917,000541  
 mandelbrot 
SML MLton2.963,352457  
C++ GNU g++3.003,312584  
 partial-sums 
SML MLton2.073,120541  
C++ GNU g++1.843,096531  
 sum-file 
SML MLton7.763,132164  
C++ GNU g++6.2914,864260  
 nsieve 
SML MLton5.2771,644367  
C++ GNU g++3.7610,788313  
 n-body 
SML MLton20.423,1161327  
C++ GNU g++12.789361705  
 nsieve-bits 
SML MLton4.585,104488  
C++ GNU g++2.803,328494  
 fasta 
SML MLton19.223,1241323  
C++ GNU g++11.693,1201248  
 fannkuch 
SML MLton14.913,124606  
C++ GNU g++8.283,096554  
 spectral-norm 
SML MLton34.693,128444  
C++ GNU g++17.493,092442  
 k-nucleotide 
SML MLton16.26257,7241068  
C++ GNU g++7.639,3121380  
 recursive 
SML MLton6.513,120453  
C++ GNU g++2.591,008566  
 reverse-complement 
SML MLton1.8559,668837  
C++ GNU g++0.6313,288810  
 pidigits 
SML MLton11.983,836498  
C++ GNU g++2.853,124652  
 chameneos-redux
   No program
 regex-dna
   No program

 Measurements for all the accepted programs

 SML MLton : whole-program optimizing compiler 

MLton 20070826

Whole-Program Compilation in MLton (pdf slides)

Home Page: http://mlton.org/

Download: http://mlton.org/download/

Revised BSD license