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.73 3,616 1065 1.73 2% 1% 100% 1%
C++ g++ 1.89 3,740 508 1.89 2% 99% 0% 2%
fannkuch-redux
source secs mem gz cpu cpu load
Ada 2005 GNAT 10.19 4,140 2100 40.60 100% 100% 100% 100%
C++ g++ 10.58 2,520 950 41.88 100% 100% 99% 98%
mandelbrot
source secs mem gz cpu cpu load
Ada 2005 GNAT 5.70 32,000 1805 22.54 100% 99% 99% 99%
C++ g++ 5.82 33,952 726 22.40 96% 95% 95% 100%
spectral-norm
source secs mem gz cpu cpu load
Ada 2005 GNAT 2.01 4,240 2762 7.88 99% 99% 99% 98%
C++ g++ 2.01 1,792 1044 8.00 100% 100% 100% 100%
n-body
source secs mem gz cpu cpu load
Ada 2005 GNAT 10.29 1,908 2604 10.29 100% 1% 0% 0%
C++ g++ 9.30 1,712 1763 9.29 100% 1% 1% 0%
reverse-complement
source secs mem gz cpu cpu load
Ada 2005 GNAT 0.73 201,012 3220 0.85 36% 1% 80% 0%
C++ g++ 0.59 217,564 2275 0.84 26% 78% 12% 34%
binary-trees
source secs mem gz cpu cpu load
Ada 2005 GNAT 5.37 160,624 2167 17.43 83% 93% 74% 79%
C++ g++ 3.36 158,320 846 10.59 81% 82% 78% 75%
k-nucleotide
source secs mem gz cpu cpu load
Ada 2005 GNAT 11.63 277,648 4865 25.16 31% 20% 86% 81%
C++ g++ 7.15 164,080 1252 24.21 82% 83% 80% 96%
fasta
source secs mem gz cpu cpu load
Ada 2005 GNAT 4.11 2,044 2186 4.10 0% 1% 100% 1%
C++ g++ 1.47 9,484 2291 5.13 88% 88% 87% 88%
regex-redux
source secs mem gz cpu cpu load
  No program contribute your program
C++ g++ 0.08 ? 700 0.12 13% 0% 50% 89%
Ada 2005 GNAT

GNATMAKE 5.4.0

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

C++ g++

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609