÷

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


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

 C++ GNU g++ used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 k-nucleotide1/31/6
 reverse-complement1/31/2
 binary-trees1/31/2±
 chameneos-redux1/31/11±
 regex-dna1/31/7
 fasta1/21/16±
 pidigits1/21/181/3
 mandelbrot1/21/2±
 spectral-norm±1/12±
 fannkuch±1/12±
 n-body±1/16±

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

 Step 3 : Are the C++ GNU g++ 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 C++ GNU g++ program are shown for comparison against measurements of the fastest Java 6 -server program.

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

 Measurements for all the accepted programs

 C++ GNU g++ : c plus objects plus generics 

C++ 1991-2006, Bjarne Stroustrup (pdf)

gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)

Home Page: http://gcc.gnu.org/

Download: ftp://ftp.gnu.org/pub/gnu/gcc/

Revised BSD license