/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
 spectral-norm±±±
 n-body±±±
 binary-trees±±1/2
 fannkuch-redux±±±
 regex-dna±±1/2
 reverse-complement±1/3
 fasta-redux±
 mandelbrot±±
 fasta±±
 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 
Scala3.582.9852,4241125  6% 12% 4% 99%
Java 7 -server10.614.4363,1561826  71% 69% 52% 45%
 spectral-norm 
Scala17.734.6123,360720  95% 96% 95% 99%
Java 7 -server17.624.5017,716950  98% 99% 98% 98%
 n-body 
Scala23.4923.4522,8521358  0% 0% 0% 100%
Java 7 -server22.5222.5016,9201424  0% 100% 0% 0%
 binary-trees 
Scala34.6811.14657,864641  86% 79% 72% 77%
Java 7 -server22.869.41516,1441007  83% 41% 64% 57%
 fannkuch-redux 
Scala64.5416.4224,1961017  99% 98% 99% 98%
Java 7 -server53.1913.4717,4161282  98% 100% 98% 100%
 regex-dna 
Scala27.019.03627,784723  69% 72% 61% 98%
Java 7 -server23.366.63636,9241410  92% 87% 88% 86%
 reverse-complement 
Scala2.432.40321,772505  1% 3% 0% 98%
Java 7 -server2.741.31298,2201661  45% 54% 37% 79%
 fasta-redux 
Scala4.914.6033,0801372  1% 100% 4% 3%
Java 7 -server2.562.5117,3041443  0% 100% 1% 1%
 mandelbrot 
Scala46.8111.9372,616796  98% 99% 98% 98%
Java 7 -server23.976.1069,360796  98% 99% 98% 98%
 fasta 
Scala10.4110.2527,2081080  3% 1% 1% 100%
Java 7 -server5.225.1418,1761507  0% 100% 1% 1%
 k-nucleotide 
Scala112.9730.44490,3081257  92% 92% 93% 95%
Java 7 -server29.238.03463,5162431  90% 98% 89% 89%

 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) 64-Bit 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