comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: LRM 4.1.3 paragraphs 17-19
Date: 12 Feb 91 19:13:20 GMT	[thread overview]
Message-ID: <2711@sparko.gwu.edu> (raw)

In article <631.27b781ac@vger.nsu.edu> g_harrison@vger.nsu.edu ((George C. Harrison) Norfolk State University) writes:
>
>What do you mean by "_better_ optimized code?"  If you mean what constructs
>_might_ lead the compiler to produce more optimized code than the "Brute Force"
>methods like in the example of this original posting, I'd agree with your
>assessment below.  "Optimized" to programmers generally means what the compiler
>(and often the linker) does to make a faster, smaller executable.  These
>constructs, I believe, leave their implementations better open to
>these optimizations.
>
>> IMHO aggregates, universal assignment (i.e.
>> assignment operator for structured types) and universal equality are three
>> such things. 
That is what I meant, inarticulately though I may have written it. The point is
that many Ada programmers do not focus on some of these constructs, which not
only save their own time and make their code clearer, but may make their
code faster as well. I see a lot of code written with the brute force
structures used in older languages - this is a shame because the Ada is not
only not as "good" but also potentially not as fast.
>
>The other kind of optimization is that which saves the programmers time and
>makes him/her more effective.  These include generics, separate compilation,
>exceptions, overloading, and other supports for abstraction.  The problem is
>that this kind of programmer optimization does not necessarily lead to
>executable optimization.  
>
Well, sure. I certainly wouldn't argue against using the real abstraction
power of Ada. I was really trying to make a different point, namely that
even if one sticks to the "classical" part of Ada - the inner, program-
level syntax, one can potentially get some nice optimization just by
using the language well, without doing tricks. I am still astounded by
the number of programmers who know all about (or think they know all about)
packages, generics, renaming declarations, etc., and who continue to
assert that Ada executables are _necessarily_ slow. They are actually pleased 
when I point out the "little" ways in which Ada can be faster.
They say "hmmmm... I never focused on that..."

Mike

         reply	other threads:[~1991-02-12 19:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-02-08  6:34 Ada Test Tools Scott Layson
1991-02-09  2:39 ` LRM 4.1.3 paragraphs 17-19 Joe Vlietstra
1991-02-11 14:57   ` Michael Feldman
1991-02-12  9:48     ` (George C. Harrison) Norfolk State University
1991-02-12 19:13       ` Michael Feldman [this message]
1991-02-12 21:44         ` Billy Yow 283-4009
1991-02-13  4:32           ` Michael Feldman
1991-02-13 16:32             ` jncs
1991-02-15  4:11     ` Jim Showalter
  -- strict thread matches above, loose matches on Subject: below --
1991-02-14  3:41 Michael Feldman
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox