/mobile Handheld Friendly website

vs

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

† 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++ g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fannkuch-redux 
Ada 2005 GNAT39.349.931,6842100  100% 98% 99% 100% †
C++ g++27.2827.302961150  1% 1% 1% 100% †
 fasta-redux 
Ada 2005 GNAT1.992.001,2361909  0% 2% 100% 0%
C++ g++2.162.166321474  2% 0% 100% 1%
 pidigits 
Ada 2005 GNAT2.682.682,0721254  0% 1% 100% 1%
C++ g++2.682.681,464682  1% 0% 2% 100%
 fasta 
Ada 2005 GNAT4.254.251,2362186  1% 0% 1% 100%
C++ g++4.224.238841286  1% 0% 0% 100%
 mandelbrot 
Ada 2005 GNAT24.826.2629,9241805  99% 100% 99% 99%
C++ g++23.475.9032,0881017  99% 99% 99% 100%
 spectral-norm 
Ada 2005 GNAT9.402.401,9042762  98% 98% 99% 98%
C++ g++7.962.009361044  100% 100% 100% 100%
 binary-trees 
Ada 2005 GNAT14.845.03117,8202167  86% 58% 76% 74%
C++ g++12.244.0988,368919  70% 69% 95% 62%
 k-nucleotide 
Ada 2005 GNAT21.9610.11253,4924865  24% 36% 100% 60%
C++ g++23.317.26137,2161252  74% 97% 76% 75%
 regex-dna 
Ada 2005 GNAT19.656.4793,0763740  67% 70% 72% 96%
C++ g++5.974.42179,480695  1% 77% 58% 1%
 reverse-complement 
Ada 2005 GNAT1.641.24197,1243220  42% 1% 26% 64%
C++ g++1.220.84245,4562275  29% 33% 49% 35%
 n-body 
Ada 2005 GNAT15.1015.111,2362427  1% 0% 0% 100%
C++ g++9.089.083441545  1% 0% 0% 100%

† 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++ g++ 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++ g++ 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.1 (Ubuntu/Linaro 4.8.1-10ubuntu8)

Home Page: The Libre Site

Download: Download GNAT GPL and SPARK GPL Editions

Revised BSD license

  Home   Conclusions   License   Play