comp.lang.ada
 help / color / mirror / Atom feed
From: Geoff Bull <gbull@acenet.com.au>
Subject: Re: GNAT & GCC performace (bad news)
Date: 1999/12/03
Date: 1999-12-03T00:00:00+00:00	[thread overview]
Message-ID: <38473D90.68D8F47@acenet.com.au> (raw)
In-Reply-To: B46CA6A1.2991%Harald.Schmidt@tomcat.de



Harald Schmidt wrote:
 What I was expecting,
> because gnat isn't a compiler env. but a to-C(++) translator,
> the performance decrease about ten to twenty percent but
> not 50 percent.

Gnat is a true compiler. It does not translate to-C(++).

My experience is that, for equivalent code, Gnat produces code
that is as fast or slightly faster than C. This is not
surprising when one considers that Gnat and the Gnu C compiler
share the *same* backend code generator.
OTOH, my first Gnat program was about 100 times slower than the C
I had translated. Once I understood why (the C was buffering its IO,
the Ada was not) and made a few changes, the Ada version was a few
percentage points faster.

I suggest you look at your benchmarks to make sure they
are really equivalent.
Also, did you compile both with the same levels of optimisation
and turn off Ada's run time checks (in my experience, the latter
doesn't usually make an enormous difference, but it is worth a try)?

__
Geoff




  parent reply	other threads:[~1999-12-03  0:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-02  0:00 GNAT & GCC performace (bad news) Harald Schmidt
1999-12-02  0:00 ` Dmitriy Anisimkov
1999-12-02  0:00 ` Tucker Taft
1999-12-02  0:00 ` nabbasi
1999-12-02  0:00 ` David Starner
1999-12-02  0:00 ` James E. Hopper
1999-12-03  0:00   ` Robert A Duff
1999-12-04  0:00   ` Robert Dewar
1999-12-04  0:00     ` Harald Schmidt
1999-12-03  0:00 ` Mats Weber
1999-12-03  0:00 ` Geoff Bull [this message]
1999-12-03  0:00   ` Larry Kilgallen
1999-12-06  0:00     ` Robert Dewar
1999-12-06  0:00       ` Larry Kilgallen
1999-12-06  0:00         ` Robert A Duff
1999-12-07  0:00           ` Robert Dewar
1999-12-07  0:00             ` Tucker Taft
1999-12-08  0:00               ` Robert Dewar
1999-12-08  0:00                 ` Ada2001
1999-12-09  0:00             ` Wes Groleau
1999-12-10  0:00               ` Robert Dewar
1999-12-10  0:00                 ` Arthur Evans Jr
1999-12-11  0:00                   ` Robert Dewar
1999-12-17  0:00               ` Richard Kenner
1999-12-07  0:00         ` Robert Dewar
1999-12-03  0:00   ` Geoff Bull
1999-12-03  0:00 ` Robert Dewar
replies disabled

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