comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jeffrey.carter@boeing.com>
Subject: Re: Numerical Computation and Ada95
Date: Thu, 10 May 2001 18:21:58 GMT
Date: 2001-05-10T18:21:58+00:00	[thread overview]
Message-ID: <3AFADC46.FD0522A7@boeing.com> (raw)
In-Reply-To: 9dc6io$a2g2@news.cis.okstate.edu

David Starner wrote:
> 
> There's always the question on whether you want fast programs or
> correct programs. (-: Most Ada compilers offer switches to turn off
> run-time checks, so there should be practically no difference
> between the speed of Fortran, C++ and Ada. (In practice, Ada seems
> to be slightly slower (10-20%) even with the checks turned off. This
> will of course vary widely depending on your program and enviroment.)

This, I am glad to say, is simply wrong. Robert Dewar has a suite of
equivalent Ada and C programs that generate *identical* object code when
compiled with gcc. Back in the dark days of Ada 83, the highly optimized
Tartan Ada compiler produced faster code than the C benchmarks Tartan
used to convince people to buy their *C* compilers instead of using the
free one that TI shipped with their DSPs. An article in _Ada Letters_
described the features of Ada and C that allowed them to do better
optimization for Ada than for C.

There was also a case of a Tartan Ada compiler producing faster code
than hand-optimized assembler. This was described in a TRI-Ada
presentation. The people developing the Ada made no special effort to
make the code fast, because the purpose of the project was to prove that
Ada was NOT fast enough. The project failed, sort of like the Tuskegee
Airman project.

In general, using modern compilers and modern processors, equivalent
programs will produce equivalent execution times.

--
Jeffrey Carter



  parent reply	other threads:[~2001-05-10 18:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-09 19:13 Numerical Computation and Ada95 N&J
2001-05-09 19:42 ` David Starner
2001-05-10 12:23   ` Pat Rogers
2001-05-10 13:51   ` Ted Dennison
2001-05-10 18:21   ` Jeffrey Carter [this message]
2001-05-09 19:43 ` Ted Dennison
2001-05-09 21:57 ` James Rogers
2001-05-10  0:41 ` Dr Adrian Wrigley
2001-05-10  5:45   ` N&J
2001-05-10  6:37     ` David Starner
2001-05-10  6:48     ` tmoran
2001-05-10 20:12       ` Gary Scott
2001-05-10 14:04     ` Ted Dennison
2001-05-11 14:15       ` Marin David Condic
2001-05-10 20:08     ` Gary Scott
2001-05-11 11:58       ` Larry Kilgallen
2001-05-11 11:31         ` Dan Nagle
2001-05-11 14:33         ` Gary Scott
2001-05-11  4:00     ` Lao Xiao Hai
2001-05-11 14:03     ` Marin David Condic
2001-05-10  8:00 ` Martin Dowie
2001-05-10 14:11   ` Ted Dennison
2001-05-10 15:46     ` Martin Dowie
2001-05-10 13:54 ` Martin Stift
2001-05-11  5:59   ` mike
2001-05-10 19:07 ` Laurent Guerby
2001-05-10 20:49 ` N&J
2001-05-11 16:28   ` Jean-Pierre Rosen
2001-05-11 18:28     ` Marin David Condic
2001-05-13 21:42   ` Gautier de Montmollin
2001-05-11  2:02 ` DuckE
replies disabled

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