From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b12a5cee4778f63 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: GNAT & GCC performace (bad news) Date: 1999/12/06 Message-ID: <82fgh2$mt3$1@nnrp1.deja.com>#1/1 X-Deja-AN: 556962077 References: <38473D90.68D8F47@acenet.com.au> <1999Dec3.103807.1@eisner> X-Http-Proxy: 1.0 x39.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Dec 06 05:10:59 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-12-06T00:00:00+00:00 List-Id: In article <1999Dec3.103807.1@eisner>, Kilgallen@eisner.decus.org.nospam wrote: > In article <38473D90.68D8F47@acenet.com.au>, Geoff Bull 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.