/mobile Handheld Friendly website

÷

 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.


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.

 Ada 2005 GNAT used what fraction? used how many times more? 
Benchmark Time Memory Code
 binary-trees±1/2
 fannkuch-redux±±
 spectral-norm±
 fasta±±
 pidigits±±
 reverse-complement †±±±
 mandelbrot±±
 fasta-redux±±
 regex-dna±1/2
 n-body±
 k-nucleotide
 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++ g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 binary-trees 
Ada 2005 GNAT20.116.20176,8602167  82% 79% 76% 92%
C++ g++32.349.25360,404892  89% 79% 95% 88%
 fannkuch-redux 
Ada 2005 GNAT38.189.581,9762100  100% 100% 100% 100%
C++ g++47.9512.291,2361440  100% 93% 100% 98%
 spectral-norm 
Ada 2005 GNAT7.892.011,9402762  98% 99% 99% 99%
C++ g++10.022.524921044  100% 100% 100% 100%
 fasta 
Ada 2005 GNAT4.054.061,5002186  1% 0% 100% 0%
C++ g++4.164.161,0721286  0% 0% 100% 0%
 pidigits 
Ada 2005 GNAT2.292.292,0761254  0% 0% 100% 0%
C++ g++2.292.301,648682  0% 0% 0% 100%
 reverse-complement 
Ada 2005 GNAT0.940.79197,3763220  82% 0% 0% 36% †
C++ g++1.220.77245,6922275  12% 55% 49% 46% †
 mandelbrot 
Ada 2005 GNAT22.745.7530,1441805  99% 99% 99% 98%
C++ g++19.295.0132,288726  95% 99% 96% 95%
 fasta-redux 
Ada 2005 GNAT2.032.031,5001909  0% 0% 1% 100%
C++ g++1.701.718321474  0% 0% 1% 100%
 regex-dna 
Ada 2005 GNAT17.855.6797,9883492  77% 69% 93% 77%
C++ g++5.834.10173,632695  0% 60% 82% 0%
 n-body 
Ada 2005 GNAT15.4315.441,5042427  86% 0% 0% 14%
C++ g++10.0710.078281763  0% 0% 1% 100%
 k-nucleotide 
Ada 2005 GNAT36.2213.19256,1444865  49% 42% 100% 84%
C++ g++25.897.79155,9161252  78% 80% 78% 98%

† 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

GNAT 4.6

gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3

Home Page: The Libre Site

Download: Download GNAT GPL and SPARK GPL Editions

Revised BSD license

  Home   Conclusions   License   Play