÷

 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.


 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±14×±
 spectral-norm13×±
 pidigits30×
 mandelbrot±
 binary-trees±
 regex-dna1/2
 chameneos-redux31×±
 k-nucleotide1/2
 reverse-complement1/4
 fasta16×±

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

 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 -server23.1323.1315,1001424  0% 0% 0% 100%
C++ GNU g++20.5720.569321428  0% 0% 0% 100%
 fannkuch 
Java 6 -server68.4719.0917,5841150  81% 97% 74% 99%
C++ GNU g++49.7513.741,3001186  80% 76% 100% 100%
 spectral-norm 
Java 6 -server17.334.5115,208950  98% 95% 94% 97%
C++ GNU g++11.892.991,1961114  100% 99% 99% 99%
 pidigits 
Java 6 -server14.155.7950,5081816  49% 60% 52% 56%
C++ GNU g++3.793.791,696682  0% 100% 0% 0%
 mandelbrot 
Java 6 -server42.0210.6966,984903  98% 98% 98% 99%
C++ GNU g++25.046.2928,824858  99% 99% 100% 100%
 binary-trees 
Java 6 -server20.5316.18566,032603  13% 86% 16% 11%
C++ GNU g++28.559.01357,820892  71% 62% 95% 82%
 regex-dna 
Java 6 -server26.6710.91681,824929  57% 68% 63% 55%
C++ GNU g++18.375.0497,4641588  87% 96% 90% 91%
 chameneos-redux 
Java 6 -server12.578.6441,2881756  37% 45% 15% 40%
C++ GNU g++13.053.571,3281800  82% 77% 100% 100%
 k-nucleotide 
Java 6 -server49.2214.57480,4081602  79% 78% 98% 82%
C++ GNU g++20.275.54177,1482673  99% 88% 90% 93%
 reverse-complement 
Java 6 -server2.712.67475,908592  3% 1% 94% 3%
C++ GNU g++1.210.85245,6442275  37% 13% 80% 14%
 fasta 
Java 6 -server8.248.2215,1441240  0% 1% 0% 100%
C++ GNU g++2.262.269641470  100% 0% 1% 0%

 Java 6 -server : ubiquitous jit server virtual machine 

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

Benchmarking the Java HotSpot VM

Revised BSD license