The Computer Language
Benchmarks Game

Ada 2012 GNAT versus C gcc fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

fannkuch-redux
source secs mem gz busy cpu load
Ada 2012 GNAT 8.06 4,348 2113 32.11 99% 100% 100% 100%
C gcc 7.58 872 910 29.61 100% 98% 99% 93%
pidigits
source secs mem gz busy cpu load
Ada 2012 GNAT 0.88 4,704 1130 0.89 0% 0% 100% 1%
C gcc 0.81 2,804 416 0.84 1% 2% 99% 1%
k-nucleotide
source secs mem gz busy cpu load
Ada 2012 GNAT 6.65 258,464 4908 13.94 25% 100% 19% 65%
C gcc 3.72 130,260 1506 12.07 100% 89% 78% 57%
spectral-norm
source secs mem gz busy cpu load
Ada 2012 GNAT 0.76 4,260 2770 2.95 97% 97% 96% 97%
C gcc 0.40 872 1197 1.58 100% 100% 100% 98%
binary-trees
source secs mem gz busy cpu load
Ada 2012 GNAT 3.12 202,368 2107 9.63 79% 93% 67% 71%
C gcc 1.54 168,832 809 4.35 60% 67% 57% 100%
n-body
source secs mem gz busy cpu load
Ada 2012 GNAT 5.13 1,984 2617 5.15 0% 0% 100% 0%
C gcc 2.18 768 1633 2.19 0% 100% 0% 0%
reverse-complement
source secs mem gz busy cpu load
Ada 2012 GNAT 2.18 817,648 3283 2.53 0% 40% 76% 0%
C gcc 0.86 712,208 820 1.27 99% 28% 1% 19%
mandelbrot
source secs mem gz busy cpu load
Ada 2012 GNAT 4.02 35,812 1819 15.96 100% 99% 99% 100%
C gcc 1.27 31,792 1135 5.08 100% 100% 99% 100%
fasta
source secs mem gz busy cpu load
Ada 2012 GNAT 2.60 1,988 2221 2.63 0% 2% 0% 100%
C gcc 0.78 1,156 1463 0.78 0% 0% 0% 100%
regex-redux
source secs mem gz busy cpu load
Ada 2012 GNAT 4.33 154,312 3640 12.50 92% 69% 63% 66%
C gcc 0.80 152,172 1397 2.01 52% 99% 48% 53%
Ada 2012 GNAT

GNATMAKE 10.3.0

gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0

C gcc

gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0