÷

 Step 1 : Are the Java 6 -server 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 Java 6 -server program used compared to the fastest C++ GNU g++ program.


 Step 2 : Are the Java 6 -server 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 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
 n-body±17×±
 chameneos-redux±12×±
 spectral-norm±13×±
 mandelbrot±
 binary-trees±±
 fannkuch13×±
 regex-dna1/2
 fasta16×±
 reverse-complement1/4
 k-nucleotide10×1/2
 pidigits18×132×±

± read the measurements and then read the program source code.

 Step 3 : Are the Java 6 -server 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 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 -server22.9322.9415,4481424  0% 0% 0% 100%
C++ GNU g++22.9822.999361428  0% 100% 0% 0%
 chameneos-redux 
Java 6 -server9.133.6115,7961377  85% 51% 47% 69%
C++ GNU g++13.643.571,3521994  92% 91% 100% 100%
 spectral-norm 
Java 6 -server17.194.4415,548950  97% 97% 98% 96%
C++ GNU g++12.693.511,2041278  65% 99% 99% 100%
 mandelbrot 
Java 6 -server42.5610.9067,852903  97% 97% 98% 98%
C++ GNU g++24.666.7231,464858  100% 69% 100% 100%
 binary-trees 
Java 6 -server19.3717.20565,628603  7% 11% 81% 13%
C++ GNU g++28.5610.20382,904892  89% 68% 65% 58%
 fannkuch 
Java 6 -server65.2123.8117,7561150  89% 99% 0% 86%
C++ GNU g++51.3214.011,3161186  100% 69% 98% 100%
 regex-dna 
Java 6 -server26.3411.51686,076929  58% 43% 77% 48%
C++ GNU g++13.764.37111,9641759  87% 63% 88% 76%
 fasta 
Java 6 -server7.967.9715,5641240  0% 0% 1% 99%
C++ GNU g++2.262.269721470  0% 0% 0% 100%
 reverse-complement 
Java 6 -server2.552.55448,912592  97% 0% 3% 2%
C++ GNU g++0.880.71245,6642275  0% 19% 47% 78%
 k-nucleotide 
Java 6 -server48.0514.17513,6121602  79% 95% 84% 81%
C++ GNU g++7.272.4349,5523416  61% 71% 100% 67%
 pidigits 
Java 6 -server41.0140.56222,872800  2% 0% 0% 99%
C++ GNU g++2.302.311,692682  0% 100% 1% 0%

 Step 4 : Are there other Java 6 -server programs for these benchmarks?

Remember - those are just the fastest Java 6 -server and C++ GNU g++ programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Java 6 -server.

Maybe one of those other Java 6 -server programs is fastest on a different OS/machine.

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

Remember - those are just the fastest Java 6 -server and C++ GNU g++ 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 6 -server : ubiquitous jit server virtual machine 

java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, 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."

Benchmarking the Java HotSpot VM

Revised BSD license

  Home   Flawed   Fastest   License   Help