1 : At a glance - Are the Ada 2005 GNAT programs faster?

Each chart bar shows, for one unidentified benchmark, how much the fastest Ada 2005 GNAT program used compared to the fastest C gcc program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Approximately - Are the Ada 2005 GNAT programs faster?

Each table row shows, for one named benchmark, how much the fastest Ada 2005 GNAT program used compared to the fastest C gcc program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Ada 2005 GNAT used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide1/2
 pidigits± 
 spectral-norm± 
 binary-trees±±
 fasta-redux± ±
 fasta± 
 mandelbrot± 
 reverse-complement±
 n-body 
 fannkuch-redux 
 regex-dna1/2±
 Ada 2005 GNAT used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/2±±

± read the measurements and then read the program source code.

 3 : Measurements - Are the Ada 2005 GNAT programs faster?

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest Ada 2005 GNAT program are shown for comparison against measurements of the fastest C gcc program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
Ada 2005 GNAT21.0321.06271,6364865  0% 1% 0% 100%
C gcc35.6335.65127,8521535  0% 1% 1% 100%
 pidigits 
Ada 2005 GNAT2.682.683,8241254  0% 1% 0% 100%
C gcc2.492.502,172448  1% 0% 1% 100%
 spectral-norm 
Ada 2005 GNAT9.199.213,9562762  1% 0% 1% 100%
C gcc7.857.851,7281139  1% 0% 1% 100%
 binary-trees 
Ada 2005 GNAT10.8810.91105,2002167  1% 0% 1% 100%
C gcc9.099.10100,724906  1% 1% 1% 100%
 fasta-redux 
Ada 2005 GNAT1.991.991,6441909  3% 1% 2% 100%
C gcc1.571.585681402  5% 0% 1% 100%
 fasta 
Ada 2005 GNAT4.314.311,7002186  1% 1% 0% 100%
C gcc3.233.246641261  1% 0% 1% 100%
 mandelbrot 
Ada 2005 GNAT32.2532.2732,1681805  1% 0% 0% 100%
C gcc22.3622.3731,616799  1% 0% 0% 100%
 reverse-complement 
Ada 2005 GNAT1.191.20200,5603220  0% 0% 2% 99%
C gcc0.760.76251,444741  3% 0% 0% 100%
 n-body 
Ada 2005 GNAT18.0618.071,5762436  1% 0% 0% 100%
C gcc10.3410.357481490  1% 1% 0% 100%
 fannkuch-redux 
Ada 2005 GNAT50.4450.473,9282100  1% 0% 1% 100%
C gcc24.3224.336601183  1% 0% 1% 100%
 regex-dna 
Ada 2005 GNAT19.1119.13174,3603492  1% 2% 1% 100%
C gcc5.435.44293,2042579  1% 1% 0% 100%

 4 : Are there other Ada 2005 GNAT programs for these benchmarks?

Remember - those are just the fastest Ada 2005 GNAT and C gcc programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Ada 2005 GNAT.

Maybe one of those other Ada 2005 GNAT programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Ada 2005 GNAT and C gcc programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Ada 2005 GNAT : large-scale safety-critical software 

Ada 2012 as a Parallel Language for High Performance Computing (pdf)

book Ada Distilled: An introduction to Ada Programming for Experienced Computer Programmers, Richard Riehle, 2003 (pdf)

wikibook Ada Programming

GNATMAKE 4.9.2

gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)

Home Page: The Libre Site

Download: Download GNAT GPL and SPARK GPL Editions

Revised BSD license

  Home   Conclusions   License   Play