/mobile Handheld Friendly website
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 | |
| regex-dna | ± | ± | ± | |
| n-body | ± | ± | ± | |
| fannkuch-redux | ± | ± | ± | |
| spectral-norm | ± | ± | ± | |
| binary-trees | ± | ± | 1/2 | |
| reverse-complement | 2× | ± | 1/3 | |
| mandelbrot | 2× | ± | ± | |
| fasta | 2× | ± | ± | |
| fasta-redux | 2× | 2× | ± | |
| k-nucleotide | 3× | ± | 1/2 | |
| Scala used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | ± | ± | 2× | 3× | 3× |
± 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 | 4.44 | 3.91 | 43,780 | 1125 | 3% 5% 7% 100% |
| Java 7 -server | 12.36 | 5.16 | 47,348 | 1826 | 60% 61% 61% 54% |
| regex-dna | |||||
| Scala | 28.62 | 9.60 | 598,932 | 723 | 64% 82% 61% 93% |
| Java 7 -server | 28.92 | 10.07 | 708,180 | 929 | 65% 64% 83% 76% |
| n-body | |||||
| Scala | 23.96 | 23.92 | 18,032 | 1358 | 0% 0% 100% 0% |
| Java 7 -server | 24.37 | 24.34 | 13,932 | 1424 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| Scala | 69.47 | 17.72 | 19,384 | 1017 | 99% 97% 99% 98% |
| Java 7 -server | 67.73 | 17.13 | 14,208 | 1282 | 98% 99% 99% 100% |
| spectral-norm | |||||
| Scala | 16.69 | 4.36 | 18,572 | 720 | 95% 94% 99% 95% |
| Java 7 -server | 16.38 | 4.21 | 14,556 | 950 | 97% 97% 99% 98% |
| binary-trees | |||||
| Scala | 34.67 | 11.20 | 648,920 | 641 | 87% 78% 68% 78% |
| Java 7 -server | 23.89 | 9.78 | 532,932 | 1007 | 61% 77% 45% 63% |
| reverse-complement | |||||
| Scala | 2.46 | 2.41 | 404,620 | 505 | 1% 3% 99% 2% |
| Java 7 -server | 2.88 | 1.52 | 294,656 | 1661 | 56% 74% 46% 16% |
| mandelbrot | |||||
| Scala | 46.61 | 11.91 | 67,336 | 796 | 97% 97% 99% 98% |
| Java 7 -server | 27.15 | 6.89 | 67,832 | 796 | 98% 99% 99% 99% |
| fasta | |||||
| Scala | 10.14 | 9.95 | 21,592 | 1080 | 1% 0% 100% 1% |
| Java 7 -server | 4.95 | 4.86 | 14,976 | 1507 | 1% 0% 100% 1% |
| fasta-redux | |||||
| Scala | 4.48 | 4.14 | 22,932 | 1372 | 2% 1% 6% 100% |
| Java 7 -server | 1.89 | 1.84 | 14,420 | 1443 | 1% 2% 3% 100% |
| k-nucleotide | |||||
| Scala | 94.47 | 25.70 | 482,568 | 1257 | 92% 91% 95% 91% |
| Java 7 -server | 34.65 | 9.39 | 381,176 | 2431 | 92% 89% 97% 92% |
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) 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/