/mobile Handheld Friendly website

÷

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


Look at speed another way - look at a box plot of Time-used data.

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

 Java 7 -server used what fraction? used how many times more? 
Benchmark Time Memory Code
 fasta±53×±
 binary-trees±±±
 fannkuch-redux±15×±
 mandelbrot±±
 n-body±47×±
 fasta-redux±17×±
 pidigits39×
 regex-dna1/2
 spectral-norm25×±
 reverse-complement±±
 k-nucleotide±
 Java 7 -server used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±

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

 Step 3 : Are the Java 7 -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 7 -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
 fasta 
Java 7 -server5.255.1917,6601507  0% 1% 2% 100%
C++ GNU g++6.196.203321266  0% 0% 0% 100%
 binary-trees 
Java 7 -server18.018.55534,9241007  68% 92% 17% 36%
C++ GNU g++27.519.04360,536892  96% 85% 66% 60%
 fannkuch-redux 
Java 7 -server53.2713.5017,0561282  98% 99% 98% 100%
C++ GNU g++48.5412.441,1641440  100% 100% 93% 98%
 mandelbrot 
Java 7 -server27.627.0168,140802  98% 99% 99% 99%
C++ GNU g++24.316.1132,2281017  100% 100% 100% 100%
 n-body 
Java 7 -server22.5122.4916,7841424  0% 0% 0% 100%
C++ GNU g++19.3519.363561659  0% 0% 0% 100%
 fasta-redux 
Java 7 -server2.472.4217,0921443  1% 0% 100% 1%
C++ GNU g++2.002.001,0081474  0% 0% 100% 1%
 pidigits 
Java 7 -server9.333.8661,4881808  55% 54% 58% 56%
C++ GNU g++2.292.301,580682  0% 0% 1% 100%
 regex-dna 
Java 7 -server25.559.01785,700929  66% 76% 69% 75%
C++ GNU g++15.705.0390,9441759  90% 89% 76% 57%
 spectral-norm 
Java 7 -server17.684.5317,264950  97% 97% 98% 98%
C++ GNU g++10.032.526881044  100% 100% 100% 100%
 reverse-complement 
Java 7 -server2.571.27313,0801661  45% 41% 33% 91%
C++ GNU g++1.070.69245,6682275  20% 16% 42% 88%
 k-nucleotide 
Java 7 -server29.918.17458,4762431  89% 91% 95% 93%
C++ GNU g++11.623.35138,5443415  83% 81% 86% 98%

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

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

Maybe one of those other Java 7 -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 7 -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 7 -server : ubiquitous jit server virtual machine 

java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

Home Page: Java SE at a Glance

Download: Java SE Downloads

See What about Java?

"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   Conclusions   License   Help