comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <dewar@gnat.com>
Subject: Re: GNAT & GCC performace (bad news)
Date: 1999/12/06
Date: 1999-12-06T00:00:00+00:00	[thread overview]
Message-ID: <82fgh2$mt3$1@nnrp1.deja.com> (raw)
In-Reply-To: 1999Dec3.103807.1@eisner

In article <1999Dec3.103807.1@eisner>,
  Kilgallen@eisner.decus.org.nospam wrote:
> In article <38473D90.68D8F47@acenet.com.au>, Geoff Bull
<gbull@acenet.com.au> writes:
>
> > Gnat is a true compiler. It does not translate to-C(++).
>
> The second statement does not prove the first.
>
> From what I have read in this newsgroup, it emits assembly
language
> which then must be fed through an assembler on the machine.



Well quibble away :-)

But there is a huge difference between emitting assembly
language, which is just a 1-1 shorthand for machine language,
and is therefore obviously equivalent from a performance
point of view to emitting machine language (*)

and emitting C, where there are two significant problems:

1. It may be impossible to emit efficient code for a given
construct in the intermediate high level language (e.g.
exceptions, compiler checks, various other things ...)

2. The C compiler will introduce inefficiencies of its own
for the generated code.

In the compiler field it is traditional (and critical) to
distinguishe between compilers that emit assembly or
machine language (the two are equivalent from this point
of view), and translators that translate from one high
level language to another.

(*) the reason that gcc (and many other compilers) generate
assembly language instead of machine language is to isolate the
compiler from oddities of diverse object code formats (indeed
it is hard to imagine a highly portable backend technology which
would make any other choice).

Robert Dewar
Ada Core Technologies


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~1999-12-06  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 ` 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-02  0:00 ` David Starner
1999-12-02  0:00 ` nabbasi
1999-12-02  0:00 ` Tucker Taft
1999-12-03  0:00 ` Geoff Bull
1999-12-03  0:00   ` Larry Kilgallen
1999-12-06  0:00     ` Robert Dewar [this message]
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 ` Mats Weber
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