÷

 Step 1 : Are the Java 6 -server programs faster? At a glance.

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.


 Step 2 : Are the Java 6 -server programs faster? Approximately.

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±12×±
 spectral-norm±12×±
 mandelbrot±
 pidigits18×
 fasta16×±
 regex-dna1/2
 chameneos-redux11×±
 binary-trees±
 reverse-complement1/4
 k-nucleotide1/2

± 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.

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 -server25.0325.0312,4081424  100% 0% 0% 0%
C++ GNU g++23.8223.827881428  100% 0% 0% 0%
 fannkuch 
Java 6 -server66.2618.4313,7761150  78% 77% 98% 99%
C++ GNU g++49.6113.631,1601186  81% 77% 100% 100%
 spectral-norm 
Java 6 -server15.954.1112,552950  97% 97% 98% 97%
C++ GNU g++11.983.001,0321114  100% 100% 100% 100%
 mandelbrot 
Java 6 -server43.1210.9548,920903  98% 98% 99% 98%
C++ GNU g++24.676.1730,436858  100% 100% 100% 100%
 pidigits 
Java 6 -server12.955.0028,6241816  61% 59% 57% 55%
C++ GNU g++2.712.711,600682  0% 0% 0% 100%
 fasta 
Java 6 -server7.507.4912,6481240  0% 1% 99% 0%
C++ GNU g++3.783.788161470  99% 1% 0% 0%
 regex-dna 
Java 6 -server30.6412.27665,900929  51% 54% 71% 74%
C++ GNU g++14.674.7897,0641759  84% 60% 100% 63%
 chameneos-redux 
Java 6 -server22.808.2412,5921377  50% 54% 84% 73%
C++ GNU g++11.332.881,1681994  99% 99% 100% 97%
 binary-trees 
Java 6 -server29.6319.18289,920603  24% 75% 27% 28%
C++ GNU g++18.866.32173,332892  60% 74% 74% 71%
 reverse-complement 
Java 6 -server2.982.94473,712592  1% 94% 4% 2%
C++ GNU g++1.340.92245,4402275  68% 50% 14% 15%
 k-nucleotide 
Java 6 -server47.5314.24762,5481602  80% 80% 95% 79%
C++ GNU g++14.804.31132,4523415  81% 80% 99% 84%

 Measurements for all the accepted programs

 Java 6 -server : ubiquitous jit server virtual machine 

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, 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