comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada vs C implementation efficiency
@ 1991-06-19 14:16 Bob Munck
  1991-06-20 19:37 ` Robert I. Eachus
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Munck @ 1991-06-19 14:16 UTC (permalink / raw)


In INFO-ADA Digest V91 #165, eachus@mitre-bedford.arpa  (Robert I. Eachus)
said:

> ...  In general, for good compilers
>and good benchmarks a program will run fastest in the language it was
>originally written in.

You CAN'T mean that exactly as written.  Surely the history of a benchmark
has little to do with its results.  Maybe you mean something like "line-at-
a-time, uncritical translation of a program from one language to another
almost always result in poor performance of the translated program compared
to the original."?

>     My personal approach, based on this experiment and others, is to
>go for correctness first, and if you need better performance, look at
>the algorithms, THEN at the code.  I have gotten to the point of
>looking at generated code once or twice, but in every case I have
>found a way to coerce the compiler to generate what I wanted.

An important point, and something that a lot of programmers learn late in
their careers or not at all.  Note too that this approach to performance
tends to preserve maintainability.  My way of stating this approach:

                RULES FOR PROGRAM OPTIMIZATION:
                
                1. Don't do it.
                
                2. (Experts only) Don't do it yet.
                
I do have my doubts about "coerce the compiler to generate what I wanted."
What happens when a new compiler release doesn't coerce the same way?  Besides,
playing with object code makes hair grow on your palms.

Bob Munck

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Ada vs C implementation efficiency
@ 1991-06-15 17:37 Sam Harbaugh-AFES PROJECT
  1991-06-17  9:49 ` George C. Harrison, Norfolk State University
  1991-06-18 16:48 ` Robert I. Eachus
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Harbaugh-AFES PROJECT @ 1991-06-15 17:37 UTC (permalink / raw)


Paul Kohlmiller writes:
Jim,
  Could you specify one or more machines that have an available ADA compiler
that generates code that is as efficient as a C compiler for the same machine?
thnx
Paul Kohlmiller
--
Last I checked, about 5 years ago, the DEC Ada compiler outperformed the
DEC C compiler on Whetstone bechmark.
sam harbaugh saharbaugh@ROO.FIT.EDU        
-----------

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1991-06-20 19:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-06-19 14:16 Ada vs C implementation efficiency Bob Munck
1991-06-20 19:37 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1991-06-15 17:37 Sam Harbaugh-AFES PROJECT
1991-06-17  9:49 ` George C. Harrison, Norfolk State University
1991-06-19 23:33   ` Bob Kitzberger @sation
1991-06-18 16:48 ` Robert I. Eachus

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