The Computer Language
Benchmarks Game

Ada 2005 GNAT programs versus C++ g++

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Ada 2005 GNAT 8.70 163,000 3618 25.50 86% 78% 69% 60%
C++ g++ 17.14 220,088 853 25.22 95% 3% 51% 1%
pidigits
source secs mem gz cpu cpu load
Ada 2005 GNAT 1.74 3,776 1065 1.73 1% 0% 100% 0%
C++ g++ 1.89 3,868 508 1.89 100% 1% 2% 1%
fannkuch-redux
source secs mem gz cpu cpu load
Ada 2005 GNAT 9.98 4,200 2100 39.76 100% 100% 100% 100%
C++ g++ 10.35 2,624 980 40.60 99% 99% 100% 95%
spectral-norm
source secs mem gz cpu cpu load
Ada 2005 GNAT 2.02 4,244 2762 7.88 98% 99% 98% 98%
C++ g++ 1.99 1,880 1044 7.89 100% 99% 99% 99%
n-body
source secs mem gz cpu cpu load
Ada 2005 GNAT 10.30 1,952 2604 10.30 1% 100% 0% 0%
C++ g++ 9.31 1,052 1544 9.30 1% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Ada 2005 GNAT 0.69 202,188 3220 0.80 80% 6% 1% 35%
C++ g++ 0.60 211,852 2275 0.98 38% 25% 82% 27%
k-nucleotide
source secs mem gz cpu cpu load
Ada 2005 GNAT 12.94 258,312 4865 31.07 55% 80% 21% 86%
C++ g++ 7.18 164,052 1252 24.28 83% 83% 93% 83%
fasta
source secs mem gz cpu cpu load
Ada 2005 GNAT 4.09 1,956 2186 4.08 0% 0% 0% 100%
C++ g++ 1.48 4,176 2313 5.25 89% 90% 88% 89%
mandelbrot
source secs mem gz cpu cpu load
Ada 2005 GNAT 5.58 33,932 1805 22.09 99% 100% 99% 99%
C++ g++ 1.73 34,064 1002 6.80 98% 98% 98% 99%
binary-trees
source secs mem gz cpu cpu load
Ada 2005 GNAT 7.72 202,276 2101 23.33 70% 79% 90% 68%
C++ g++ 2.36 114,404 809 7.69 86% 71% 87% 85%
Ada 2005 GNAT

GNATMAKE 6.3.0

gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406

C++ g++

g++ (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406