/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-redux1/223×±
 fasta±52×±
 fannkuch-redux±14×±
 mandelbrot±±
 n-body±44×±
 spectral-norm38×±
 binary-trees±
 reverse-complement±±
 pidigits33×
 regex-dna±
 k-nucleotide±
 Java 7 -server used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/2±

± 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-redux 
Java 7 -server1.891.8414,4201443  1% 2% 3% 100%
C++ GNU g++2.932.946161474  1% 0% 0% 100%
 fasta 
Java 7 -server4.954.8614,9761507  1% 0% 100% 1%
C++ GNU g++6.306.312881266  0% 0% 100% 0%
 fannkuch-redux 
Java 7 -server67.7317.1314,2081282  98% 99% 99% 100%
C++ GNU g++61.4215.771,0201439  100% 97% 97% 96%
 mandelbrot 
Java 7 -server27.156.8967,832796  98% 99% 99% 99%
C++ GNU g++23.745.9732,0961017  99% 99% 99% 100%
 n-body 
Java 7 -server24.3724.3413,9321424  0% 0% 0% 100%
C++ GNU g++20.1320.143201659  0% 0% 100% 0%
 spectral-norm 
Java 7 -server16.384.2114,556950  97% 97% 99% 98%
C++ GNU g++10.032.523881044  100% 100% 100% 100%
 binary-trees 
Java 7 -server23.899.78532,9321007  61% 77% 45% 63%
C++ GNU g++17.075.78178,988892  90% 71% 77% 59%
 reverse-complement 
Java 7 -server2.881.52294,6561661  56% 74% 46% 16%
C++ GNU g++1.250.86245,4562275  51% 15% 33% 49%
 pidigits 
Java 7 -server12.365.1647,3481826  60% 61% 61% 54%
C++ GNU g++2.762.761,452682  0% 0% 100% 0%
 regex-dna 
Java 7 -server28.9210.07708,180929  65% 64% 83% 76%
C++ GNU g++6.004.45174,392695  33% 2% 100% 1%
 k-nucleotide 
Java 7 -server34.659.39381,1762431  92% 89% 97% 92%
C++ GNU g++12.133.65132,0523415  83% 81% 95% 76%

 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_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Server VM (build 23.0-b21, 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