The Q6600
Benchmarks Game

C++ g++ versus Java fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

regex-redux
source secs mem gz busy cpu load
C++ g++ 1.86 203,856 1315 4.49 99% 50% 48% 44%
Java 10.27 635,500 740 29.42 74% 81% 55% 76%
mandelbrot
source secs mem gz busy cpu load
C++ g++ 1.51 26,256 1791 6.01 100% 99% 99% 99%
Java 6.84 76,008 796 26.90 99% 98% 98% 98%
n-body
source secs mem gz busy cpu load
C++ g++ 7.70 1,612 1879 7.81 100% 0% 1% 1%
Java 21.85 34,112 1489 22.16 1% 0% 0% 100%
k-nucleotide
source secs mem gz busy cpu load
C++ g++ 3.88 156,164 1631 12.09 72% 92% 71% 77%
Java 9.14 403,576 1812 29.10 87% 72% 74% 86%
binary-trees
source secs mem gz busy cpu load
C++ g++ 3.96 113,236 809 12.86 74% 84% 98% 69%
Java 8.28 948,040 835 28.20 80% 84% 87% 90%
spectral-norm
source secs mem gz busy cpu load
C++ g++ 1.99 2,408 1044 7.89 99% 99% 99% 99%
Java 4.15 36,428 950 16.26 98% 100% 98% 97%
reverse-complement
source secs mem gz busy cpu load
C++ g++ 1.89 499,672 2093 1.94 100% 2% 1% 1%
Java 3.27 714,144 2183 7.54 47% 60% 66% 58%
fasta
source secs mem gz busy cpu load
C++ g++ 1.46 2,024 2711 4.40 75% 76% 75% 76%
Java 2.22 43,096 2473 6.10 67% 83% 45% 80%
fannkuch-redux
source secs mem gz busy cpu load
C++ g++ 10.71 1,708 980 42.33 100% 96% 100% 100%
Java 16.12 33,168 1282 63.71 100% 98% 99% 98%
pidigits
source secs mem gz busy cpu load
C++ g++ 1.82 4,312 513 1.87 1% 1% 2% 100%
Java 1.83 34,848 764 1.95 99% 1% 4% 2%
C++ g++

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0

Java

openjdk 14 2020-03-17
OpenJDK Runtime Environment (build 14+36-1461)
OpenJDK 64-Bit Server VM (build 14+36-1461, mixed mode, sharing)