From: David Starner <dvdeug@x8b4e53cd.dhcp.okstate.edu>
Subject: Re: naval systems
Date: 1 Mar 2002 02:59:36 GMT
Date: 2002-03-01T02:59:36+00:00 [thread overview]
Message-ID: <a5mqqo$9283@news.cis.okstate.edu> (raw)
In-Reply-To: 4rcf8.1777$I33.586791085@newssvr12.news.prodigy.com
On Wed, 27 Feb 2002 21:44:32 GMT, Pat Rogers <progers@classwide.com> wrote:
> Ah, this is what I'm trying to get to. Taking the defaults for the two
> compilers/languages is *not* comparable. You need to at least turn of run-time
> checking for the Ada program. That's enough to invalidate the test by itself.
>
>> Given both the null program and Hello, World!, the C compiler took about
>> 1/3 of the time that GNAT did, with no options and with -O2 -g.
>
> That isn't as meaningful as one might think, although it is not an uncommon
> test. I assume you used Text_IO? The compile times were hugely overshadowed by
> handling of the I/O libraries. That is not a comparable program to one in C
> that uses the much simpler I/O library.
>
>> I generated a 32,002 line program that had 32,000 randomly pointing (but
>> the same for the C and Ada program) goto statements in it, and told it
>> to write to assembly only, with no optimization. The C compiler took 4
>> seconds. GNAT took 7 minutes to tell me I was missing a semicolon. After
>> fixing that semicolon, it took 6 minutes 59 seconds to produce assembly
>> with no significant difference.
>>
>> The last case is a bit pathological, but it is a data point.
>
> So pathological, in fact, that I don't believe they were the "same" program.
> I'm surprised anyone would!
You mean, besides the fact that GNAT and GNU C produced the exact same
assembly, except for four instructions (apparently GNU C felt the need
to align the stack, where GNAT didn't). You mean besides the fact the
fact the two programs have the exact same semantics - emit no output and
never exit except on a signal.
> It is extremely easy to get this kind of thing wrong -- thinking that the
> semantics are the same when they aren't. I've done it before and no doubt will
> do it again. It is trivially easy to drive an Ada compiler to its knees -- over
> a period of several grinding minutes in some compilers -- by declaring a series
> of named numbers that look like regular old C constants.
All nice advocate answers. Now back to real life, if I write several
programs simple enough that the semantics are exactly the same for each
language, and each one is slower to compile with GNAT than GNU C, then
I will come to the conclusion that GNAT is slower than GNU C.
You seem to be interested in some idealized "fair" compairson. But
that's not what matters - what matters is how long it takes on real life
programs.
> Otherwise we are
> only comparing implementations and cannot generalize the result.
Um, of course we can generalize the result. That's science - you take
sample data points and see if you can draw a conclusion. How an
idealized optimal Ada compiler performs is of little interest; how the
Ada compiler that's on their desk or will be on their desk performs is
of interest.
> Again, we are talking about compile time, not the time it takes to build the
> executable, because indeed the Ada binder/linker implements requirements that
> the C tools do not bother with, like interface consistency. And again, we are
> talking about compiling the same way -- with the switches set so that the
> compilers behave comparably. Turning of the checking is the obvious example.
You keep trying to add a handicap. The interesting question is time from
submitting the sources to getting a binary; any features is a whole
different question. What switches should be added is a complex question,
but the answer should have to do with what will be normally used, and
not what would make it more theoratically "fair".
> At the end of the day, we are in agreement that in practice the time it takes to
> produce an executable image from an Ada toolchain is typically slightly longer.
> What we're arguing is whether the compilation phase itself is inherently slower,
What does "inherently slower" mean? If you go back to the original post
to which I responded, he was talking about most implementations being as
fast as most C implementations; that was what I was responding to; I
never said anything about all Ada implementations being inherently slower.
--
David Starner - starner@okstate.edu
What we've got is a blue-light special on truth. It's the hottest thing
with the youth. -- Information Society, "Peace and Love, Inc."
next prev parent reply other threads:[~2002-03-01 2:59 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
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 [this message]
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