[comp.lang.ada] Ada Promises

schmidt@zola.ics.uci.edu (Doug Schmidt) (11/16/89)

In article <7053@hubcap.clemson.edu>, billwolf%hazel (William Thomas Wolfe, 2847 ) writes:
>   This has been a property of some early Ada *compilers*, but is
>   not a property of the Ada *language*.  

I basically agree with this in principle, though Ganapathi and
Mendal's IEEE Computer article from February 1989 points out several
areas where the Ada's semantics of reordering operations restricts
code motion and strength reduction.  I'd assume that this penalizes
Ada on certain RISC processors since it limits the degree of
instruction scheduling possible.

>   Fortunately, compiler
>   technology is now capable of delivering tight, efficient Ada
>   object code, better than that being produced by C compilers.

Ironically, Ganapathi and Mendal conclude their article by stating
that:
 
  Use of the following Ada capabilities may hinder optimizations currently
  implemented in most Ada compilers:
  
  * exceptions
  * generic units
  * private and limited private types in package definitions
  * naming and modularity of package definitions, and
  * tasking

In other words, just about every major feature that differentiates Ada
from Modula 2 or Pascal exacts a penalty on optimization.  This is a
realistic and understandable phenomenon (C/C++ certainly contain their
share of features that disrupt optimization), but it also makes me
wonder just exactly what you mean with your claim that Ada compilers
produce better code than C compilers.

To avoid misunderstanding, can you please cite *specific* examples
(especially references to publically available literature) to support
your claim?  For example:

1. Precisely which Ada compilers produce better code than which C compilers?
   Not all compilers are created equal...

2. What are the benchmarks and where can they be obtained?  If, in
   order to generate good code, Ada programmers must limit themselves to
   a `Pascal subset' of the language exactly what advantages have
   accrued?

3. What are the hardware/OS platforms and what are the relative costs
   between the Ada and C compilers/environments?  After all, it is
   unfair to compare a $500,000 Rational Ada environment against
   a $120 copy of Turbo C on MS DOS ;-).

Without independently verifiable, empirical evidence it is difficult
to make an informed choice on this issue.  In the words of R. P.
Feynman:

  The fundamental principle of science, the definition almost, is this:
  the sole test of the validity of any idea is experiment.

Additional proof would greatly increase my confidence that Ada is more than
just another `promising' language (pun intended!).

thanks,

  Doug
--
Master Swordsman speak of humility;             | schmidt@ics.uci.edu (ARPA)
Philosophers speak of truth;                    | office: (714) 856-4034
Saints and wisemen speak of the Tao of no doubt;
The moon, sun, and sea speaks for itself. -- Hiroshi Hamada