comp.lang.ada
 help / color / mirror / Atom feed
From: dvdeug@x8b4e53cd. (David Starner)
Subject: Re: Ada95 Strengths/Weaknesses.
Date: 1999/09/28
Date: 1999-09-28T00:00:00+00:00	[thread overview]
Message-ID: <7spauv$a2g2@news.cis.okstate.edu> (raw)
In-Reply-To: 7sp8m9$a6e$1@nnrp1.deja.com

In article <7sp8m9$a6e$1@nnrp1.deja.com>, Robert Dewar wrote:
>In article <7smp30$9aa1@news.cis.okstate.edu>,
>  dstarner98@aasaa.ofe.org wrote:
>
>> * C compilers have a standardized interface. OTOH, you can
>> distinuigsh Ada compilers by the required file names
>
>Are there really Ada compilers that have "required file names"?
>Certainly GNAT does not have required file names. 
It cetianly has preferred file names, which are different from
the preferred names of other compilers.

>So this to me is one place that Ada clearly wins over C, rather
>than loses.
I guess I wasn't very clear. For most C compilers, I can say
    cc -o joebob joebob.c 
and it will work. This isn't true for Ada. There is no standaradized
interface, and there's not even standard file names. 

>> * C & C++ compilers will usually produce smaller and faster
>> code, albeit usually less than an order of magnitude.
>
>Well an order of magnitude would be a catastrophe, but in fact
>the statement is just false. If your Ada compiler produces
>junk code, get another one. In the case of GNAT, the compiler
>uses exactly the same code generator as the GNU C compiler or
>the G++ compiler, so for comparable source code, you get
>identical object code.

Check. I just recently hand converted a small game from C++ to Ada using
G++ and GNAT respectively. The only changes besides that were going from
0 based indexing to 1 based, and dropping some debug code in the process.
g++ *.cpp -o Alexis produces a binary with a size of 15,796 bytes. gnatmake 
alexis-char produces a binary with a size of 735,962 bytes. Some tweaks later
(dynamic linking, no runtime checks, striping the files) produces a C++ binary
of 12,568 bytes and an Ada binary of 51,124 bytes. Stripping out the random
number library I had used from Mat Weber's Components (which cripples the
program, but to be fair Mat Weber says it's redundant with Ada95, so I could 
probably remove it if I knew how) brings us down to 32,196, over twice the 
size of the original.

So, since GNAT is junk, do you have another Ada compiler to recommend?

David Starner - dstarner98@aasaa.ofe.org




  reply	other threads:[~1999-09-28  0:00 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-27  0:00 Ada95 Strengths/Weaknesses the middleman
1999-09-27  0:00 ` Steve Doiel
1999-09-27  0:00 ` J. David Bryan
1999-09-27  0:00 ` David Starner
1999-09-28  0:00   ` the middleman
1999-09-28  0:00   ` Robert Dewar
1999-09-28  0:00     ` David Starner [this message]
1999-09-28  0:00       ` p.obry
1999-09-28  0:00         ` David Starner
1999-09-28  0:00           ` Richard D Riehle
1999-09-28  0:00       ` Gautier
1999-09-28  0:00         ` David Starner
1999-09-29  0:00           ` Robert Dewar
1999-09-28  0:00         ` Ed Falis
1999-09-28  0:00           ` David Starner
1999-09-29  0:00           ` Robert Dewar
1999-09-28  0:00       ` Ted Dennison
1999-09-28  0:00         ` Simon Wright
1999-09-28  0:00       ` Robert Dewar
1999-09-28  0:00         ` David Starner
1999-09-29  0:00           ` Robert Dewar
1999-09-30  0:00         ` Pragma (was Re: Ada95 Strengths/Weaknesses.) Preben Randhol
1999-09-30  0:00           ` Preben Randhol
1999-09-28  0:00       ` Ada95 Strengths/Weaknesses Robert Dewar
1999-09-28  0:00     ` Code size of Ada ? was " Alfred Hilscher
1999-09-28  0:00       ` Gautier
1999-09-28  0:00       ` David Botton
1999-09-29  0:00       ` Robert Dewar
1999-09-29  0:00         ` Larry Kilgallen
1999-09-29  0:00           ` Robert Dewar
1999-09-29  0:00           ` Alfred Hilscher
1999-09-29  0:00             ` Ted Dennison
1999-09-29  0:00             ` Gautier
1999-09-29  0:00               ` Ed Falis
1999-09-29  0:00                 ` Gautier
1999-09-29  0:00                 ` tmoran
1999-09-30  0:00               ` Robert Dewar
1999-09-29  0:00             ` Robert Dewar
1999-09-30  0:00               ` Alfred Hilscher
1999-09-30  0:00                 ` Gautier
1999-09-30  0:00                   ` Robert Dewar
1999-09-30  0:00                   ` Robert Dewar
1999-09-30  0:00                   ` Robert Dewar
1999-09-30  0:00                 ` Robert Dewar
1999-09-30  0:00                   ` tmoran
1999-09-30  0:00                   ` Ehud Lamm
1999-09-30  0:00                     ` Robert Dewar
     [not found]                       ` <7t2e1l$lqt2@ftp.kvaerner.com>
     [not found]                         ` <37F91D6E.58685CFE@mitre.org>
     [not found]                           ` <7tf7uo$h2b$1@nnrp1.deja.com>
     [not found]                             ` <37FBA978.A86762F1@mitre.org>
1999-10-18  0:00                               ` Robert Dewar
1999-10-19  0:00                                 ` Code size of Ada ? Robert I. Eachus
     [not found]                           ` <7tf7uo <37FBA978.A86762F1@mitre.org>
     [not found]                             ` <5OkO3.2$1e.659@typhoon.nyu.edu>
1999-10-19  0:00                               ` Code size of Ada ? was Re: Ada95 Strengths/Weaknesses Robert I. Eachus
1999-09-29  0:00           ` Robert Dewar
1999-09-29  0:00         ` Alfred Hilscher
1999-09-29  0:00           ` Robert Dewar
1999-09-30  0:00             ` Alfred Hilscher
1999-09-30  0:00               ` Gautier
1999-09-30  0:00               ` Robert Dewar
1999-09-28  0:00     ` GNAT listing file default names (was: Ada95 Strengths/Weaknesses) Larry Kilgallen
1999-09-28  0:00       ` Gautier
1999-09-29  0:00         ` Robert Dewar
1999-09-29  0:00       ` Robert Dewar
1999-09-29  0:00         ` Larry Kilgallen
1999-09-29  0:00           ` Robert Dewar
1999-09-29  0:00             ` Larry Kilgallen
1999-09-30  0:00               ` Robert Dewar
1999-09-28  0:00   ` Ada95 Strengths/Weaknesses Robert Dewar
1999-09-28  0:00     ` David Starner
1999-09-28  0:00       ` Robert Dewar
1999-09-28  0:00         ` Ray Blaak
1999-09-28  0:00     ` David Starner
1999-09-29  0:00       ` Robert A Duff
1999-09-27  0:00 ` Marin David Condic
1999-09-27  0:00   ` Hyman Rosen
1999-09-28  0:00     ` Ed Falis
1999-09-28  0:00       ` Hyman Rosen
1999-09-28  0:00         ` Ed Falis
1999-09-28  0:00     ` Robert Dewar
1999-09-28  0:00       ` Preben Randhol
1999-09-28  0:00         ` bill
1999-09-27  0:00           ` Aidan Skinner
1999-09-28  0:00           ` Steve Doiel
1999-09-28  0:00           ` Larry Kilgallen
1999-09-28  0:00           ` Preben Randhol
1999-09-28  0:00   ` Preben Randhol
1999-09-28  0:00 ` Geoff Bull
1999-09-29  0:00   ` the middleman
1999-09-29  0:00     ` Robert A Duff
1999-09-28  0:00 ` Geoff Bull
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox