The Computer Language
Benchmarks Game

Ada 2005 GNAT programs versus C++ g++

by benchmark task performance

k-nucleotide
source secs mem gz cpu cpu load
Ada 2005 GNAT 21.13 270,628 4865 21.09 0% 1% 1% 100%
C++ g++ 24.04 137,908 1252 23.98 1% 1% 0% 100%
fasta
source secs mem gz cpu cpu load
Ada 2005 GNAT 4.32 1,648 2186 4.31 0% 1% 1% 100%
C++ g++ 4.21 1,336 1105 4.20 1% 1% 0% 100%
pidigits
source secs mem gz cpu cpu load
Ada 2005 GNAT 2.50 3,516 1065 2.50 2% 0% 0% 100%
C++ g++ 2.27 3,440 508 2.27 0% 1% 1% 100%
spectral-norm
source secs mem gz cpu cpu load
Ada 2005 GNAT 9.21 3,816 2762 9.19 1% 1% 0% 100%
C++ g++ 7.93 2,288 1044 7.92 1% 1% 0% 100%
reverse-complement
source secs mem gz cpu cpu load
Ada 2005 GNAT 1.22 200,692 3220 1.20 2% 2% 1% 98%
C++ g++ 1.02 247,604 2275 1.01 2% 0% 0% 100%
n-body
source secs mem gz cpu cpu load
Ada 2005 GNAT 11.20 1,632 2604 11.19 0% 1% 0% 100%
C++ g++ 8.96 816 1545 8.95 1% 1% 0% 100%
mandelbrot
source secs mem gz cpu cpu load
Ada 2005 GNAT 30.90 32,064 1805 30.88 0% 1% 1% 100%
C++ g++ 20.11 33,768 726 20.10 0% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Ada 2005 GNAT 11.06 105,232 2167 11.03 0% 0% 1% 100%
C++ g++ 6.86 76,616 846 6.85 0% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Ada 2005 GNAT 50.49 3,836 2100 50.46 1% 0% 1% 100%
C++ g++ 24.65 556 1150 24.64 1% 1% 0% 100%
Ada 2005 GNAT

GNATMAKE 4.9.3

gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)

C++ g++

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