/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® quad-core |
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.
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 | 2× | ± | 1/3 | |
| fasta-redux | 2× | 2× | ± | |
| mandelbrot | 2× | ± | ± | |
| fasta | 2× | ± | ± | |
| k-nucleotide | 4× | ± | 1/2 | |
| Scala used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | ± | ± | 2× | 3× | 4× |
± read the measurements and then read the program source code.
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 | |||||
| Scala | 3.58 | 2.98 | 52,424 | 1125 | 6% 12% 4% 99% |
| Java 7 -server | 10.61 | 4.43 | 63,156 | 1826 | 71% 69% 52% 45% |
| spectral-norm | |||||
| Scala | 17.73 | 4.61 | 23,360 | 720 | 95% 96% 95% 99% |
| Java 7 -server | 17.62 | 4.50 | 17,716 | 950 | 98% 99% 98% 98% |
| n-body | |||||
| Scala | 23.49 | 23.45 | 22,852 | 1358 | 0% 0% 0% 100% |
| Java 7 -server | 22.52 | 22.50 | 16,920 | 1424 | 0% 100% 0% 0% |
| binary-trees | |||||
| Scala | 34.68 | 11.14 | 657,864 | 641 | 86% 79% 72% 77% |
| Java 7 -server | 22.86 | 9.41 | 516,144 | 1007 | 83% 41% 64% 57% |
| fannkuch-redux | |||||
| Scala | 64.54 | 16.42 | 24,196 | 1017 | 99% 98% 99% 98% |
| Java 7 -server | 53.19 | 13.47 | 17,416 | 1282 | 98% 100% 98% 100% |
| regex-dna | |||||
| Scala | 27.01 | 9.03 | 627,784 | 723 | 69% 72% 61% 98% |
| Java 7 -server | 23.36 | 6.63 | 636,924 | 1410 | 92% 87% 88% 86% |
| reverse-complement | |||||
| Scala | 2.43 | 2.40 | 321,772 | 505 | 1% 3% 0% 98% |
| Java 7 -server | 2.74 | 1.31 | 298,220 | 1661 | 45% 54% 37% 79% |
| fasta-redux | |||||
| Scala | 4.91 | 4.60 | 33,080 | 1372 | 1% 100% 4% 3% |
| Java 7 -server | 2.56 | 2.51 | 17,304 | 1443 | 0% 100% 1% 1% |
| mandelbrot | |||||
| Scala | 46.81 | 11.93 | 72,616 | 796 | 98% 99% 98% 98% |
| Java 7 -server | 23.97 | 6.10 | 69,360 | 796 | 98% 99% 98% 98% |
| fasta | |||||
| Scala | 10.41 | 10.25 | 27,208 | 1080 | 3% 1% 1% 100% |
| Java 7 -server | 5.22 | 5.14 | 18,176 | 1507 | 0% 100% 1% 1% |
| k-nucleotide | |||||
| Scala | 112.97 | 30.44 | 490,308 | 1257 | 92% 92% 93% 95% |
| Java 7 -server | 29.23 | 8.03 | 463,516 | 2431 | 90% 98% 89% 89% |
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.
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.
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/