÷

 Step 1 : Are the Scala 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 Scala program used compared to the fastest Java 6 -server program.


 Step 2 : Are the Scala 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 Scala program used compared to the fastest Java 6 -server program.

 Scala used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 reverse-complement±±±
 n-body±±±
 spectral-norm±±±
 binary-trees±±±
 mandelbrot±±±
 regex-dna±±±
 fasta±±±
 chameneos-redux±
 fannkuch±
 k-nucleotide±±
 pidigits13×1/3

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

 Step 3 : Are the Scala 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 Scala program are shown for comparison against measurements of the fastest Java 6 -server program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 reverse-complement 
Scala2.402.34400,424505  2% 3% 2% 97%
Java 6 -server2.982.94473,712592  1% 94% 4% 2%
 n-body 
Scala24.2624.2814,3921420  84% 0% 0% 16%
Java 6 -server25.0325.0312,4081424  100% 0% 0% 0%
 spectral-norm 
Scala17.234.4716,760720  96% 98% 95% 96%
Java 6 -server15.954.1112,552950  97% 97% 98% 97%
 binary-trees 
Scala34.1121.21292,472536  64% 29% 43% 24%
Java 6 -server29.6319.18289,920603  24% 75% 27% 28%
 mandelbrot 
Scala49.6812.6544,488737  98% 99% 98% 97%
Java 6 -server43.1210.9548,920903  98% 98% 99% 98%
 regex-dna 
Scala33.1514.89802,148659  38% 41% 52% 92%
Java 6 -server30.6412.27665,900929  51% 54% 71% 74%
 fasta 
Scala9.409.3713,1081207  0% 0% 1% 100%
Java 6 -server7.507.4912,6481240  0% 1% 99% 0%
 chameneos-redux 
Scala48.1015.3621,6561171  63% 67% 83% 72%
Java 6 -server22.808.2412,5921377  50% 54% 84% 73%
 fannkuch 
Scala132.5736.01105,4761001  90% 91% 94% 91%
Java 6 -server66.2618.4313,7761150  78% 77% 98% 99%
 k-nucleotide 
Scala120.6139.80608,3401287  78% 75% 75% 74%
Java 6 -server47.5314.24762,5481602  80% 80% 95% 79%
 pidigits 
Scala20.0717.76383,612632  5% 5% 10% 93%
Java 6 -server12.955.0028,6241816  61% 59% 57% 55%

 Measurements for all the accepted programs

 Scala : higher-order type-safe programming for jvm 

Scala code runner version 2.7.7.final -- Copyright 2002-2009, LAMP/EPFL

Online book: Programming in Scala pdf

A Scala Tutorial for Java programmers pdf

Home Page: http://scala.epfl.ch/

Download: http://scala.epfl.ch/downloads/index.html

Revised BSD license