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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: GNAT & GCC performace (bad news) Date: 1999/12/06 Message-ID: <1999Dec6.073729.1@eisner>#1/1 X-Deja-AN: 557240745 References: <38473D90.68D8F47@acenet.com.au> <1999Dec3.103807.1@eisner> <82fgh2$mt3$1@nnrp1.deja.com> X-Trace: news.decus.org 944483854 16419 KILGALLEN [216.44.122.34] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1999-12-06T00:00:00+00:00 List-Id: In article <82fgh2$mt3$1@nnrp1.deja.com>, Robert Dewar writes: > 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. The C compiler may also introduce optimizations specific to the machine that were not provided by the earlier compiler. If you read the propaganda for the Averstar Ada-to-C project, an aim seems to be to leverage effort machine manufacturers are already putting into optimizing their C compilers. Of course there are other optimizations that can only be done well with the full Ada semantics. On a theoretical basis, it is possible to do anything in machine language one can do in a higher level language. However I believe that optimizing for various versions of a particular chip is higher priority for the folks pushing that chip than they are for the folks trying to provide a multi-platform compiler (regardless of whether it emits assembly language or C code). Larry Kilgallen