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
 spectral-norm± 
 k-nucleotide±±
 mandelbrot± 
 fannkuch-redux± 
 fasta-redux± ±
 pidigits± 
 reverse-complement±
 binary-trees±
 n-body 
 fasta † ±
 regex-dna1/2±
 Ada 2005 GNAT used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±

± 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
 spectral-norm 
Ada 2005 GNAT7.872.004,2242762  99% 99% 99% 98%
C gcc8.282.091,776569  100% 100% 100% 99%
 k-nucleotide 
Ada 2005 GNAT25.6811.63278,4684865  100% 19% 42% 62%
C gcc35.0511.64190,2242280  59% 96% 96% 53%
 mandelbrot 
Ada 2005 GNAT24.146.0932,0041805  99% 99% 100% 99%
C gcc19.775.1332,240694  95% 96% 100% 96%
 fannkuch-redux 
Ada 2005 GNAT44.8311.274,1002100  100% 100% 99% 100%
C gcc35.659.101,516910  99% 96% 97% 100%
 fasta-redux 
Ada 2005 GNAT1.981.981,9601909  0% 3% 1% 99%
C gcc1.571.576641321  2% 1% 100% 1%
 pidigits 
Ada 2005 GNAT2.292.294,2241254  1% 0% 7% 100%
C gcc1.721.731,996448  2% 1% 1% 100%
 reverse-complement 
Ada 2005 GNAT0.910.78203,0363220  79% 3% 4% 37%
C gcc0.750.49251,716741  33% 20% 31% 72%
 binary-trees 
Ada 2005 GNAT18.005.46178,5082167  93% 76% 77% 88%
C gcc10.183.26160,856906  64% 76% 75% 99%
 n-body 
Ada 2005 GNAT18.0018.001,9082436  0% 100% 1% 0%
C gcc10.5010.509681490  100% 0% 1% 1%
 fasta 
Ada 2005 GNAT4.064.071,9882186  1% 0% 0% 100% †
C gcc5.361.972,4721914  61% 34% 78% 99% †
 regex-dna 
Ada 2005 GNAT16.485.49126,2083492  64% 93% 77% 67%
C gcc5.812.45314,2002579  71% 52% 45% 71%

 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