x64 Ubuntu : Intel® Q6600® quad-core |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used.
Each chart bar shows, for one unidentified benchmark, how much the fastest Java 6 -server program used compared to the fastest C++ GNU g++ program.
This table shows 3 comparisons - Time-used, Memory-used and Code-used.
Each table row shows, for one named benchmark, how much the fastest Java 6 -server program used compared to the fastest C++ GNU g++ program.
| Java 6 -server used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | Reduced N |
| n-body | ± | 16× | ± | |
| fannkuch | ± | 14× | ± | |
| spectral-norm | 2× | 13× | ± | |
| pidigits | 2× | 30× | 3× | |
| mandelbrot | 2× | 2× | ± | |
| binary-trees | 2× | 2× | ± | |
| regex-dna | 2× | 7× | 1/2 | |
| chameneos-redux | 2× | 31× | ± | |
| k-nucleotide | 3× | 3× | 1/2 | |
| reverse-complement | 3× | 2× | 1/4 | |
| fasta | 4× | 16× | ± | |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.
For each named benchmark, measurements of the fastest Java 6 -server program are shown for comparison against measurements of the fastest C++ GNU g++ program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
|---|---|---|---|---|---|
| n-body | |||||
| Java 6 -server | 23.13 | 23.13 | 15,100 | 1424 | 0% 0% 0% 100% |
| C++ GNU g++ | 20.57 | 20.56 | 932 | 1428 | 0% 0% 0% 100% |
| fannkuch | |||||
| Java 6 -server | 68.47 | 19.09 | 17,584 | 1150 | 81% 97% 74% 99% |
| C++ GNU g++ | 49.75 | 13.74 | 1,300 | 1186 | 80% 76% 100% 100% |
| spectral-norm | |||||
| Java 6 -server | 17.33 | 4.51 | 15,208 | 950 | 98% 95% 94% 97% |
| C++ GNU g++ | 11.89 | 2.99 | 1,196 | 1114 | 100% 99% 99% 99% |
| pidigits | |||||
| Java 6 -server | 14.15 | 5.79 | 50,508 | 1816 | 49% 60% 52% 56% |
| C++ GNU g++ | 3.79 | 3.79 | 1,696 | 682 | 0% 100% 0% 0% |
| mandelbrot | |||||
| Java 6 -server | 42.02 | 10.69 | 66,984 | 903 | 98% 98% 98% 99% |
| C++ GNU g++ | 25.04 | 6.29 | 28,824 | 858 | 99% 99% 100% 100% |
| binary-trees | |||||
| Java 6 -server | 20.53 | 16.18 | 566,032 | 603 | 13% 86% 16% 11% |
| C++ GNU g++ | 28.55 | 9.01 | 357,820 | 892 | 71% 62% 95% 82% |
| regex-dna | |||||
| Java 6 -server | 26.67 | 10.91 | 681,824 | 929 | 57% 68% 63% 55% |
| C++ GNU g++ | 18.37 | 5.04 | 97,464 | 1588 | 87% 96% 90% 91% |
| chameneos-redux | |||||
| Java 6 -server | 12.57 | 8.64 | 41,288 | 1756 | 37% 45% 15% 40% |
| C++ GNU g++ | 13.05 | 3.57 | 1,328 | 1800 | 82% 77% 100% 100% |
| k-nucleotide | |||||
| Java 6 -server | 49.22 | 14.57 | 480,408 | 1602 | 79% 78% 98% 82% |
| C++ GNU g++ | 20.27 | 5.54 | 177,148 | 2673 | 99% 88% 90% 93% |
| reverse-complement | |||||
| Java 6 -server | 2.71 | 2.67 | 475,908 | 592 | 3% 1% 94% 3% |
| C++ GNU g++ | 1.21 | 0.85 | 245,644 | 2275 | 37% 13% 80% 14% |
| fasta | |||||
| Java 6 -server | 8.24 | 8.22 | 15,144 | 1240 | 0% 1% 0% 100% |
| C++ GNU g++ | 2.26 | 2.26 | 964 | 1470 | 100% 0% 1% 0% |
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
Home Page: http://java.sun.com/j2se/
Download: http://java.sun.com/j2se/downloads/
"Remember how HotSpot works. It starts by running your program with an interpreter. When it discovers that some method is "hot" -- that is, executed a lot, either because it is called a lot or because it contains loops that loop a lot -- it sends that method off to be compiled. After that one of two things will happen, either the next time the method is called the compiled version will be invoked (instead of the interpreted version) or the currently long running loop will be replaced, while still running, with the compiled method. The latter is known as "on stack replacement" and exists in the 1.3/1.4 HotSpot based systems."