From: Preben Randhol <randhol@pvv.org>
Subject: Re: Gnat optimizes better than gcc C?
Date: 1999/12/17
Date: 1999-12-17T16:10:01+00:00 [thread overview]
Message-ID: <m3r9gly2dt.fsf@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: 83djjr$qqo$1@nnrp1.deja.com
Ted Dennison <dennison@telepath.com> writes:
| In article <3859a321.0@news.pacifier.com>,
| "DuckE" <nospam_steved@pacifier.com> wrote:
| > Check out "The Big Online Book of Linux Ada Programming" at
| > http://www.vaxxine.com/pegasoft/homes/kburtch.html
|
|
| Hmm. Section 7.4 shows an example of an algorithm coded in Ada and C
| where the optimizer can make the Ada code run twice as fast as the C. I
| knew it was theoreticaly possible for this to happen, due to the extra
| info Ada's types provide the compiler. However, I was under the
| impression that Gnat/gcc wasn't able to take advantage of this
| information. Is this right?
I do not know, but I compiled the Ada and C programs as is with -O3
for C and -O3 -gnatp for Ada this gave 23 seconds for the C program
and 28 seconds for Ada. Including pragma pack(atype) reduced the time
for the Ada program to about 7 seconds. I didn't not include any
pentium opt. flags.
But isn't it a bit dubious to use a benchmark that produces an overflow
error?
--
Preben Randhol -- [randhol@pvv.org] -- [http://www.pvv.org/~randhol/]
"Det eneste trygge stedet i verden er inne i en fortelling."
-- Athol Fugard
next prev parent reply other threads:[~1999-12-17 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-15 0:00 GNAT use psimdars
1999-12-16 0:00 ` DuckE
1999-12-17 0:00 ` Gnat optimizes better than gcc C? Ted Dennison
1999-12-17 0:00 ` Preben Randhol [this message]
1999-12-22 0:00 ` Florian Weimer
1999-12-17 0:00 ` GNAT use Preben Randhol
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox