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

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 : Are the Ada 2005 GNAT programs faster? Approximately.

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±
 fannkuch-redux± 
 pidigits± 
 mandelbrot± 
 spectral-norm± 
 fasta-redux± ±
 n-body 
 binary-trees±
 reverse-complement±
 regex-dna1/2±
 fasta † ±
 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 : Are the Ada 2005 GNAT programs faster? Measurements.

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.189.72273,9404865  57% 81% 27% 55%
C gcc35.8912.38130,7561535  94% 63% 91% 43%
 fannkuch-redux 
Ada 2005 GNAT39.299.871,6562100  100% 100% 100% 100%
C gcc38.269.75340910  100% 99% 99% 95%
 pidigits 
Ada 2005 GNAT2.682.681,7841254  1% 0% 0% 100%
C gcc2.492.49856448  3% 100% 1% 0%
 mandelbrot 
Ada 2005 GNAT24.806.2432,4801805  100% 100% 100% 100%
C gcc22.615.6728,464799  100% 100% 100% 100%
 spectral-norm 
Ada 2005 GNAT9.402.401,8802762  99% 98% 97% 98%
C gcc7.901.99644569  100% 100% 100% 100%
 fasta-redux 
Ada 2005 GNAT1.992.001,2081909  0% 1% 100% 2%
C gcc1.591.592841402  1% 1% 100% 0%
 n-body 
Ada 2005 GNAT15.0815.091,2122427  1% 0% 0% 100%
C gcc9.919.923361490  0% 0% 1% 100%
 binary-trees 
Ada 2005 GNAT15.235.00109,8442167  71% 75% 70% 94%
C gcc9.742.85103,700906  76% 76% 100% 93%
 reverse-complement 
Ada 2005 GNAT1.551.15200,6163220  1% 41% 1% 94%
C gcc0.840.58250,384741  14% 76% 21% 41%
 regex-dna 
Ada 2005 GNAT17.865.61171,9403492  79% 70% 73% 98%
C gcc6.202.59287,9002579  46% 70% 51% 74%
 fasta 
Ada 2005 GNAT4.244.241,2082186  0% 1% 1% 100% †
C gcc5.221.801,3841914  96% 89% 99% 9% †

† 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.6

gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

Home Page: The Libre Site

Download: Download GNAT GPL and SPARK GPL Editions

Revised BSD license

  Home   Conclusions   License   Play