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

† possible mismatch - one-core program compared to multi-core program.

± 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 GNAT19.298.91271,5044865  22% 49% 80% 67%
C gcc36.5812.35131,9041535  37% 71% 95% 94%
 pidigits 
Ada 2005 GNAT2.682.683,8201254  100% 0% 1% 1%
C gcc2.492.502,140448  100% 0% 1% 0%
 spectral-norm 
Ada 2005 GNAT9.362.373,8682762  99% 99% 99% 99%
C gcc7.861.981,704569  99% 100% 99% 99%
 fasta-redux 
Ada 2005 GNAT1.991.991,6441909  0% 2% 1% 100%
C gcc1.591.596241402  100% 1% 1% 0%
 fannkuch-redux 
Ada 2005 GNAT50.4512.663,9282100  100% 100% 100% 100%
C gcc39.4910.061,388910  99% 99% 95% 100%
 mandelbrot 
Ada 2005 GNAT32.258.1331,7561805  100% 99% 100% 99%
C gcc22.405.6128,988799  100% 100% 100% 100%
 binary-trees 
Ada 2005 GNAT15.114.98107,3402167  72% 93% 67% 75%
C gcc9.682.97105,024906  93% 77% 87% 72%
 reverse-complement 
Ada 2005 GNAT1.201.01202,6803220  60% 42% 2% 24%
C gcc0.860.60251,368741  95% 84% 44% 15%
 n-body 
Ada 2005 GNAT18.0418.051,6322436  1% 0% 0% 100%
C gcc10.3810.397361490  0% 100% 1% 1%
 fasta 
Ada 2005 GNAT4.314.321,7042186  100% 0% 1% 0% †
C gcc5.291.812,3521914  89% 53% 54% 100% †
 regex-dna 
Ada 2005 GNAT19.526.55168,0043492  71% 67% 73% 87%
C gcc6.342.67290,7922579  96% 76% 84% 67%

† possible mismatch - one-core program compared to multi-core program.

 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