The graphs below compare the performance of Twobit and Larceny with that of several popular implementations on a variety of small, mostly tiny benchmarks. These results should not be taken very seriously.
The benchmarked systems:
(speed 3), (safety 1), (space 0), (compilation-speed 0).
Safe code, unlimited precision integer arithmetic, no declarations.
malloc/free and with a custom
allocator and deallocator (A). Unsafe code, fixed precision
integer arithmetic.
The numbers shown are the average of three user cpu times obtained on a SPARC-10/51 with 64 Mby of RAM. There was little variation between runs on most benchmarks. The bar graphs show relative performance. Longer is better.
fib30
Larceny 1.10 *********************************************
Chez 1.31 **************************************
SML/NJ 1.98 *************************
Sun CL 1.90 **************************
AKCL 19.58 ***
g++ 1.43 ***********************************
g++ -O4 1.19 ******************************************
tak (10 repetitions)
Larceny 0.27 *********************************************
Chez 0.40 ******************************
gcc 0.37 *********************************
gcc -O4 0.19 *****************************************************\---\**
takl
Larceny 0.19 *********************************************
Chez 0.30 *****************************
gcc 0.22 ***************************************
gcc -O4 0.07 *****************************************************\---\**
gcc A 0.20 *******************************************
gcc -O4 A 0.07 *****************************************************\---\**
cpstak
Larceny 0.09 *********************************************
Chez 0.14 *****************************
SML/NJ 0.12 **********************************
idiv2
Larceny 0.06 *********************************************
Chez 0.06 *********************************************
SML/NJ 0.06 *********************************************
Sun CL 0.07 ***************************************
AKCL 0.24 ***********
rdiv2
Larceny 0.10 *********************************************
Chez 0.12 **************************************
SML/NJ 0.13 ***********************************
Sun CL 0.73 ******
AKCL 0.97 *****
boyer
Larceny 1.22 *******************************************
Chez 1.17 *********************************************
Sun CL 1.41 *************************************
AKCL 2.43 **********************
perm8
Larceny 0.42 ********************************************
Chez 0.41 *********************************************
SML/NJ 1.39 *************
Sun CL 1.05 ******************
AKCL 2.79 *******
gcc 0.48 **************************************
gcc -O4 0.36 ***************************************************
gcc A 0.19 *****************************************************\---\**
gcc -O4 A 0.10 *****************************************************\---\**
10perm8
Larceny 5.58 *********************************************
Chez 6.48 ***************************************
Sun CL 18.60 *************
AKCL 23.39 ***********
gcc 13.41 *******************
gcc -O4 11.79 *********************
gcc A 3.15 *****************************************************\---\**
gcc -O4 A 1.60 *****************************************************\---\**
sumperms8
Larceny 0.13 *****************
Chez 0.18 ************
Sun CL 0.05 *********************************************
AKCL 6.67
gcc 0.12 *******************
gcc -O4 0.05 *********************************************
mergesort8
Larceny 2.28 *************************************
Chez 2.80 ******************************
Sun CL 1.87 *********************************************
AKCL 4.47 *******************
gcc 1.77 ************************************************
gcc -O4 0.93 *****************************************************\---\**
quicksort
Larceny 1.19 **************************
Chez 1.08 ****************************
SML/NJ 2.33 *************
Sun CL 0.68 *********************************************
AKCL 15.29 **
selectionsort
Larceny 2.31 **************
Chez 2.78 ***********
SML/NJ 0.98 ********************************
Sun CL 0.70 *********************************************
AKCL 17.01 **
g++ 0.71 ********************************************
g++ -O4 0.34 *****************************************************\---\**
insertionsort
Larceny 0.72 *******************************
Chez 0.50 *********************************************
SML/NJ 0.55 *****************************************
recursive-nfa
Larceny 0.39 ************************************
Chez 0.31 *********************************************
SML/NJ 1.12 ************
Sun CL 2.14 *******
AKCL 2.61 *****
sieve
Larceny 0.53 ********************************
Chez 0.38 *********************************************
SML/NJ 0.81 *********************
Sun CL 2.26 ********
AKCL 7.45 **
puzzle
Larceny 0.84 ***************************
Chez 0.86 **************************
SML/NJ 0.50 *********************************************
Sun CL 1.20 *******************
AKCL 2.42 *********
gcc 0.22 *****************************************************\---\**
gcc -O4 0.10 *****************************************************\---\**
LL1
Larceny 2.33 **********************************
Chez 1.77 *********************************************
Sun CL 2.59 *******************************
AKCL 2.77 *****************************