From: geb@rational.com (Gary Barnes)
Subject: Re: compiler benchmark comparisons (was: naval systems)
Date: 27 Feb 2002 15:53:36 -0800
Date: 2002-02-27T23:53:36+00:00 [thread overview]
Message-ID: <17247c3d.0202271553.68aaf78d@posting.google.com> (raw)
In-Reply-To: 3C7D37FD.F67F7067@despammed.com
Wes Groleau <wesgroleau@despammed.com> wrote in message news:<3C7D37FD.F67F7067@despammed.com>...
> It would not surprise me if the _average_ C compiler
> is faster than the _average_ Ada compiler. The Ada
> compiler
>
> - must generate machine code for constraint checks,
> elaboration checks, and stack checks
Most compilers are limited by the I/O speed of the machine rather than
by what they have to do to compile the language or by the machine code
they have to generate. In the case of a C module, the compiler has to
open/read/close numerous .h files. The number of .h files that are
read simply by doing an include on something "simple" like stdio.h can
be amazing on some systems; measuring in the dozens, on others it may
be a handful. In the case of an Ada module, the compiler has to
open/read/close some number of files (GNU => every spec in the WITH
closure of the module, Rational => every directly WITH'ed spec of the
module). The number varies depending on the compiler. This is the
reason that C compiler for older "slow" machines, such as the Amiga or
the M68000 had options for creating pre-digested collections of .h
files. It reduced the number of opens and reads and greatly increased
the perceived performance of the compiler.
If you strip away the open/read times for the source code, and the
open/write times for the output, there isn't a great deal of reason
for an optimizing C compiler and and optimizing Ada compiler to be
greatly different in the time they take for comparable source code.
The open/write time will be dominated by the open.
If "average" compilation times for Ada compilers is larger than that
for "average" C compilers, it more likely because Ada compiler writers
spend a great deal of time worrying about "correct" and less time
worrying about "fast". As a conjecture, the average Ada compiler also
tends to have a "large" number of targets (for cross compilation)
whereas the average C compiler may not (GCC is a noted exception!).
As a user of both GCC and GNAT, they seem to be comparably fast. That
is strictly a "How long do I seem to have to wait and do I get
impatient." comparison.
Also, as a user of both Rational Apex Ada and the C compilers from
many Unix vendors, Rational's Ada would seem to compile similar
numbers of units per unit of time. At least, I don't get any more
impatient compiling a mound of Ada than I do a mound of C. If
anything, compiling a large Ada program seems to be faster; which is
again a seat-of-the-pants impression rather than formal results of
some sort of benchmark.
next prev parent reply other threads:[~2002-02-27 23:53 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3C74E519.3F5349C4@baesystems.com>
[not found] ` <20020221205157.05542.00000012@mb-cm.news.cs.com>
2002-02-22 12:19 ` naval systems David Gillon
2002-02-22 14:55 ` Marin David Condic
2002-02-23 5:54 ` David Starner
2002-02-25 15:05 ` Marin David Condic
2002-02-26 2:34 ` Larry Kilgallen
2002-02-26 17:44 ` David Starner
2002-02-26 19:49 ` Pat Rogers
2002-02-26 19:55 ` Ray Blaak
2002-02-26 20:46 ` Pat Rogers
2002-02-26 22:41 ` Ray Blaak
2002-02-27 0:02 ` Pat Rogers
2002-02-27 5:01 ` David Starner
2002-02-27 9:38 ` Jean-Pierre Rosen
2002-02-27 19:48 ` compiler benchmark comparisons (was: naval systems) Wes Groleau
2002-02-27 21:51 ` Pat Rogers
2002-03-01 2:04 ` David Starner
2002-03-01 4:06 ` Pat Rogers
2002-02-27 23:53 ` Gary Barnes [this message]
2002-02-28 2:19 ` Dan Andreatta
2002-02-28 10:04 ` Jerry van Dijk
2002-02-28 13:35 ` compiler benchmark comparisons Georg Bauhaus
2002-02-28 18:12 ` Dan Andreatta
2002-03-01 5:07 ` Robert Dewar
2002-03-01 16:43 ` Dan Andreatta
2002-03-01 23:17 ` Dan Andreatta
2002-03-01 23:40 ` tmoran
2002-02-28 14:18 ` compiler benchmark comparisons (was: naval systems) Wes Groleau
2002-02-28 14:31 ` Ted Dennison
2002-02-28 18:33 ` Dan Andreatta
2002-02-28 21:14 ` Wes Groleau
2002-02-28 14:01 ` Wes Groleau
2002-03-01 22:01 ` Randy Brukardt
2002-02-28 15:58 ` Larry Kilgallen
[not found] ` <338040f8.0202271819.373f733a@Organization: LJK Software <TgAW8WWqYgP5@eisner.encompasserve.org>
2002-03-01 19:29 ` Robert Dewar
2002-03-02 11:12 ` Pascal Obry
2002-03-02 19:49 ` Richard Riehle
[not found] ` <5ee5b646.0203011129.1bdbac56@po <ug03ji5ow.fsf@wanadoo.fr>
2002-03-02 18:20 ` Simon Wright
2002-02-27 2:28 ` naval systems David Starner
2002-02-27 21:44 ` Pat Rogers
2002-03-01 2:59 ` David Starner
2002-03-01 15:33 ` Pat Rogers
2002-03-01 17:22 ` Jeffrey Carter
2002-03-03 5:21 ` David Starner
2002-02-26 22:40 ` Pascal Obry
2002-02-27 0:42 ` David Starner
2002-02-23 19:18 ` John R. Strohm
2002-02-23 18:36 ` martin.m.dowie
2002-02-25 15:10 ` Marin David Condic
2002-02-28 16:33 ` tony gair
2002-02-28 17:33 ` David Gillon
2002-02-28 21:18 ` Wes Groleau
2002-03-01 17:31 ` Boeing 777 (WAS: naval systems) Simon Pilgrim
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox