The Computer Language
Benchmarks Game

Ada 2005 GNAT programs versus C++ g++

by benchmark task performance

pidigits
source secs mem gz cpu cpu load
Ada 2005 GNAT 1.75 4,328 1068 1.74 1% 1% 100% 1%
C++ g++ 1.88 4,276 513 1.88 0% 100% 1% 0%
fannkuch-redux
source secs mem gz cpu cpu load
Ada 2005 GNAT 10.23 4,504 2113 40.77 100% 100% 99% 100%
C++ g++ 10.61 2,044 980 41.90 100% 96% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Ada 2005 GNAT 2.00 4,468 2770 7.87 99% 98% 99% 99%
C++ g++ 2.02 1,332 1044 7.91 99% 99% 99% 99%
n-body
source secs mem gz cpu cpu load
Ada 2005 GNAT 8.83 2,072 2617 8.83 1% 0% 0% 100%
C++ g++ 8.23 1,856 1763 8.23 100% 1% 1% 0%
reverse-complement
source secs mem gz cpu cpu load
Ada 2005 GNAT 0.71 199,336 3283 0.84 82% 0% 0% 38%
C++ g++ 0.64 247,800 2280 1.03 89% 22% 31% 30%
k-nucleotide
source secs mem gz cpu cpu load
Ada 2005 GNAT 11.32 258,596 4908 25.26 30% 65% 42% 87%
C++ g++ 7.75 165,180 1276 26.02 80% 96% 82% 79%
fasta
source secs mem gz cpu cpu load
Ada 2005 GNAT 4.08 2,092 2221 4.08 0% 29% 72% 3%
C++ g++ 1.49 4,372 2324 5.28 89% 88% 90% 90%
binary-trees
source secs mem gz cpu cpu load
Ada 2005 GNAT 8.27 202,500 2107 26.49 93% 80% 73% 80%
C++ g++ 2.55 135,568 809 7.99 85% 96% 69% 66%
mandelbrot
source secs mem gz cpu cpu load
Ada 2005 GNAT 5.59 32,376 1819 22.17 100% 100% 98% 99%
C++ g++ 1.64 27,636 1002 6.51 100% 99% 100% 99%
regex-redux
source secs mem gz cpu cpu load
Ada 2005 GNAT 6.70 154,440 3640 19.34 68% 92% 63% 66%
C++ g++ 1.61 203,572 1315 4.18 100% 52% 57% 54%
Ada 2005 GNAT

GNATMAKE 7.2.0

gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0

C++ g++

g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0