/mobile Handheld Friendly website

÷

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

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

Each chart bar shows, for one unidentified benchmark, how much the fastest Scala program used compared to the fastest Java 7 -server program.


Look at speed another way - look at a box plot of Time-used data.

 Step 2 : Are the Scala programs faster? Approximately.

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

Each table row shows, for one named benchmark, how much the fastest Scala program used compared to the fastest Java 7 -server program.

 Scala used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits±±1/2
 regex-dna±±±
 n-body±±±
 fannkuch-redux±±±
 spectral-norm±±±
 binary-trees±±1/2
 reverse-complement±1/3
 mandelbrot±±
 fasta±±
 fasta-redux±
 k-nucleotide±1/2
 Scala used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±

± 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 ~ speed and size.

For each named benchmark, measurements of the fastest Scala program are shown for comparison against measurements of the fastest Java 7 -server program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Scala4.443.9143,7801125  3% 5% 7% 100%
Java 7 -server12.365.1647,3481826  60% 61% 61% 54%
 regex-dna 
Scala28.629.60598,932723  64% 82% 61% 93%
Java 7 -server28.9210.07708,180929  65% 64% 83% 76%
 n-body 
Scala23.9623.9218,0321358  0% 0% 100% 0%
Java 7 -server24.3724.3413,9321424  0% 0% 0% 100%
 fannkuch-redux 
Scala69.4717.7219,3841017  99% 97% 99% 98%
Java 7 -server67.7317.1314,2081282  98% 99% 99% 100%
 spectral-norm 
Scala16.694.3618,572720  95% 94% 99% 95%
Java 7 -server16.384.2114,556950  97% 97% 99% 98%
 binary-trees 
Scala34.6711.20648,920641  87% 78% 68% 78%
Java 7 -server23.899.78532,9321007  61% 77% 45% 63%
 reverse-complement 
Scala2.462.41404,620505  1% 3% 99% 2%
Java 7 -server2.881.52294,6561661  56% 74% 46% 16%
 mandelbrot 
Scala46.6111.9167,336796  97% 97% 99% 98%
Java 7 -server27.156.8967,832796  98% 99% 99% 99%
 fasta 
Scala10.149.9521,5921080  1% 0% 100% 1%
Java 7 -server4.954.8614,9761507  1% 0% 100% 1%
 fasta-redux 
Scala4.484.1422,9321372  2% 1% 6% 100%
Java 7 -server1.891.8414,4201443  1% 2% 3% 100%
 k-nucleotide 
Scala94.4725.70482,5681257  92% 91% 95% 91%
Java 7 -server34.659.39381,1762431  92% 89% 97% 92%

 Step 4 : Are there other Scala programs for these benchmarks?

Remember - those are just the fastest Scala and Java 7 -server programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Scala.

Maybe one of those other Scala programs is fastest on a different OS/machine.

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Scala and Java 7 -server programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Scala : higher-order type-safe programming for jvm 

java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode)

Scala compiler version 2.9.2 -- Copyright 2002-2011, 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

  Home   Conclusions   License   Help