The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Ada 2012 GNAT versus C gcc

Always look at the source code.

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more cpu seconds, less gz source code.

fannkuch-redux
source mem gz cpu
C gcc #6 1,044 1576 8.26
C gcc #4 964 1183 13.89
C gcc #5 1,072 910 29.38
Ada 2012 GNAT #3 4,872 2113 32.71
C gcc #3 1,016 567 42.18
C gcc 988 508 43.27
C gcc #2 1,140 1557 45.01
n-body
source mem gz cpu
C gcc #9 992 1633 2.12
C gcc #8 8 1391 4.10
C gcc #4 1,304 1490 4.44
Ada 2012 GNAT #2 2,540 2617 5.72
Ada 2012 GNAT 2,544 1618 5.91
Ada 2012 GNAT #3 2,560 1750 5.97
C gcc #5 1,020 1429 6.10
C gcc #7 1,300 1244 6.79
C gcc #2 1,264 1263 7.19
C gcc #6 1,304 1180 7.21
C gcc #3 1,304 1208 7.23
C gcc 1,264 1173 7.55
Ada 2012 GNAT #5 2,588 2447 8.92
spectral-norm
source mem gz cpu
C gcc #6 1,068 1197 1.57
C gcc #5 1,344 569 2.85
C gcc #4 1,352 1139 2.85
Ada 2012 GNAT #4 4,832 2770 2.95
Ada 2012 GNAT 2,544 716 5.36
C gcc 1,248 383 5.38
C gcc #3 1,348 463 5.68
Ada 2012 GNAT #3 4,752 1717 5.72
mandelbrot
source mem gz cpu
C gcc #6 31,244 1135 5.12
C gcc #8 33,068 782 6.29
C gcc #4 32,704 799 13.81
C gcc #7 33,108 994 13.87
C gcc 29,692 822 13.91
C gcc #3 29,840 763 13.99
Ada 2012 GNAT #3 36,256 1819 15.82
C gcc #9 32,904 694 16.03
C gcc #2 1,040 400 25.30
Ada 2012 GNAT #2 2,524 577 28.41
pidigits
source mem gz cpu
C gcc 2,648 452 0.73
C gcc #2 2,920 416 0.74
Ada 2012 GNAT #2 5,176 1130 0.74
Ada 2012 GNAT 5,380 1157 4.48
regex-redux
source mem gz cpu
C gcc #5 152,220 1397 2.02
C gcc #2 103,084 1115 3.23
C gcc #4 152,056 1230 3.24
C gcc #3 103,540 1266 3.31
Ada 2012 GNAT #5 154,816 3640 12.23
Ada 2012 GNAT #6   Bad Output  
fasta
source mem gz cpu
C gcc #9 1,256 1463 0.78
C gcc #5 1,052 1281 1.30
Ada 2012 GNAT #5 2,584 2221 2.57
Ada 2012 GNAT #2 2,496 2153 2.63
C gcc #8 1,044 1293 2.74
C gcc #6 2,140 1930 2.76
C gcc #4 1,020 1240 3.06
C gcc #2 2,860 2268 3.25
C gcc #7 2,864 2011 3.28
C gcc 1,016 1206 3.67
C gcc #3 972 819 4.49
Ada 2012 GNAT 2,528 1379 6.24
k-nucleotide
source mem gz cpu
C gcc 130,156 1506 12.31
Ada 2012 GNAT #2 258,980 4908 13.87
reverse-complement
source mem gz cpu
C gcc #7 499,132 1965 0.57
C gcc #8 499,184 1627 0.77
C gcc #6 688,416 820 1.27
C gcc #5 994,088 647 1.42
C gcc #2 994,152 750 1.45
Ada 2012 GNAT #2 786,180 3283 2.37
C gcc #4 500,416 709 3.49
Ada 2012 GNAT 515,456 937 12.46
binary-trees
source mem gz cpu
C gcc #2 168,384 809 4.32
C gcc #3 134,068 836 4.71
Ada 2012 GNAT #4 203,012 2107 10.20
Ada 2012 GNAT 266,008 888 21.99
C gcc 263,664 654 22.16
C gcc #5 351,304 908 32.02
Ada 2012 GNAT #3 528,532 1266 34.15
Ada 2012 GNAT

GNAT 11.2.0

C gcc

11.2.0-19ubuntu1