÷

 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
 regex-dna1/21/2
 sum-file±±
 nsieve±±
 pidigits±±
 binary-trees±±
 fannkuch±±
 spectral-norm±
 fasta±
 nsieve-bits±
 k-nucleotide±
 n-body12×±
 mandelbrot±
 partial-sums±
 recursive12×± 7
 reverse-complement±

± 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
 regex-dna 
Java 6 -server4.0652,248711  
C++ GNU g++6.4513,4081588  
 sum-file 
Java 6 -server4.7822,872222  
C++ GNU g++6.2914,864260  
 nsieve 
Java 6 -server4.0319,824452  
C++ GNU g++3.7610,788313  
 pidigits 
Java 6 -server3.3111,728938  
C++ GNU g++2.853,124652  
 binary-trees 
Java 6 -server7.5624,012603  
C++ GNU g++5.917,000541  
 fannkuch 
Java 6 -server11.799,888761  
C++ GNU g++8.283,096554  
 spectral-norm 
Java 6 -server27.1526,424514  
C++ GNU g++17.493,092442  
 fasta 
Java 6 -server19.9610,0961240  
C++ GNU g++11.693,1201248  
 nsieve-bits 
Java 6 -server5.1312,204517  
C++ GNU g++2.803,328494  
 k-nucleotide 
Java 6 -server15.7566,5401052  
C++ GNU g++7.639,3121380  
 n-body 
Java 6 -server27.5410,8881430  
C++ GNU g++12.789361705  
 mandelbrot 
Java 6 -server6.629,984623  
C++ GNU g++3.003,312584  
 partial-sums 
Java 6 -server6.859,460470  
C++ GNU g++1.843,096531  
 recursive N = 7 reduced workload 
Java 6 -server0.689,652427  
C++ GNU g++0.16808345  
 reverse-complement 
Java 6 -server3.6446,700863  
C++ GNU g++0.6313,288810  
 chameneos-redux
   No program

 Measurements for all the accepted programs

 Java 6 -server : ubiquitous jit server virtual machine 

Java HotSpot(TM) Server VM (build 1.6.0-b105, 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