comp.lang.ada
 help / color / mirror / Atom feed
From: Dave Wood <dpw@cts.com>
Subject: Re: Gnat Executable Size
Date: 1998/10/12
Date: 1998-10-12T00:00:00+00:00	[thread overview]
Message-ID: <3622EF5B.DBEDE54@cts.com> (raw)
In-Reply-To: 6vt8dg$coj$1@nnrp1.dejanews.com

While I agree with T.E.D. that "hello" is truly a 
useless metric in general, it can have meaning in the 
context of the "first impression", where the uninformed 
or uninitiated can fall prey to the default notion that 
"Ada is too big".  First impressions can hurt, and in
the Ada business we can't afford to be too cavalier
about first impressions (or second impressions, for
that matter).  In general, the world seems much more
forgiving of the myriad calamaties lurking beneath
the surface of C/C++, waiting to pounce upon the 
unsuspecting Pandora unlucky enough to use it for
serious business.  Such is our lot in life.

In that regard, it might be worth consideration that the 
same program, when built with ObjectAda's "runtime in a dll"
option, is about 25K, which is basically in line with an
equivalent C program.  Of course, the runtime size does
not grow linearly with program complexity, so for programs
of any significance, the runtime size is a non-issue.  To 
my knowledge, this hasn't been a serious issue for any of 
our customers.

Of course, I'm talking here about "native" targets, like
Windows.  For embedded targets, it's a different story.
For example, ObjectAda targeting our RAVEN kernel for
PowerPC, 68K, or Intel will result in minimal footprint
size on the order of a few K.  A C program bound with
Microsoft's Windows CE (which MS promotes as an RTOS),
is going to result in something on the order of several
hundred K minimum footprint, way too big for a lot of
embedded apps, substantially bigger than our closest 
equivalent product, ObjectAda for Intel/ETS (both ETS 
and WinCE are Win32 compliant.)  I grant you, in some 
ways this is an apples-to-oranges comparison, but then 
again so is pretending that "hello world" is a rational 
metric for comparing Ada and C.  It's all a matter of
what it is you are trying to do.

-- Dave Wood, Aonix
-- Product Manager, ObjectAda for Windows
-- http://www.aonix.com


dennison@telepath.com wrote:
> 
> In article <6volj0$250$1@uuneo.neosoft.com>,
>   rlove@antispam.neosoft.com (Robert B. Love ) wrote:
> 
> > How small can GNAT get "Hello World"?  What compiler options and pragmas
> > would you use for this?
> 
> To save myself some typing, I will repost the response I gave to basicly the
> same question 4 days ago in the intel-objectAda mailing list:
> -------------
> {Name Deleted} wrote:
> 
> >         I'm glad to see that the ObjectAda (7.1.1) compiler produces smaller
> >         executables.  But even with that I still get ridiculed by the C/C++
> >         hacks that I know about the size of "hello world".  Under 7.1.1,
> >         "hello world" is almost a meg (~775K) for the debug version, and
> >         just over 200K for the release version with "Suppress Checks All".
> >         The C/C++ exe's they show me are about 20-30K.
> 
> There was a quite long thread about this on c.l.a. a couple of years back. If
> you are interested, go to http://www.dejanews.com and search comp.lang.ada on
> "Executable File Size". There is a certain fixed-size overhead to Ada
> (exceptions, tasks, Text_IO on files enums and floats, etc) Basicly the size
> of "Hello World" is a useless metric unless you are actually trying to write
> an embedded "Hello World" app. Even in that case, the C user would be
> compelled to include the size of all his runtime libraries, which would
> lessen the difference greatly.
> 
> If you are instead looking for a flip answer, mine would be that Ada has a
> fair bit of overhead because it is assuming you will be doing "real work".
> The less work your program does, the better C is for the job. :-)
> 
> -------------
> 
> This is the second time in a week this silly question has come up (if you
> count once on the intel-objectada mailing list). Why all the sudden interest
> in writing useless programs? Did the DoD just put out an RFC for an embedded
> "Hello World" program?
> 
> Someone please, please put this in the FAQ.
> 
> --
> T.E.D.
> 
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own




      reply	other threads:[~1998-10-12  0:00 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-10  0:00 Gnat Executable Size Robert B. Love 
1998-10-11  0:00 ` Bryce Bardin
1998-10-12  0:00   ` Donald Duck
1998-10-14  0:00     ` dewar
1998-10-15  0:00       ` Donald Duck
1998-10-16  0:00       ` Gnat Free ? Donald Duck
1998-10-16  0:00         ` dewar
1998-10-16  0:00         ` dennison
1998-10-16  0:00           ` Ronald Cole
1998-10-16  0:00             ` Andi Kleen
1998-10-17  0:00               ` dewarr
1998-10-18  0:00                 ` Jonathan Guthrie
1998-10-18  0:00                   ` Ronald Cole
1998-10-19  0:00                     ` dewar
1998-10-19  0:00                     ` dewar
1998-10-21  0:00                       ` Ronald Cole
1998-10-18  0:00                   ` Brian Rogoff
1998-10-19  0:00                     ` Jonathan Guthrie
1998-10-18  0:00                       ` Brian Rogoff
1998-10-19  0:00                         ` dewar
1998-10-19  0:00                           ` Andi Kleen
1998-10-19  0:00                       ` dewar
1998-10-23  0:00                         ` Bruno BEAUFILS
1998-10-25  0:00                           ` dewar
1998-10-19  0:00                       ` dewar
1998-10-17  0:00             ` dewarr
1998-10-17  0:00               ` The Ludwig Family
1998-10-18  0:00                 ` dewar
1998-10-19  0:00                   ` Dale Pontius
1998-10-19  0:00                     ` dewar
1998-10-18  0:00               ` Ronald Cole
1998-10-19  0:00                 ` dewarr
1998-10-21  0:00                   ` Ronald Cole
1998-10-19  0:00                 ` Ronald Cole
1998-10-19  0:00                   ` dewarr
1998-10-23  0:00                 ` system
1998-10-17  0:00             ` Jerry van Dijk
1998-10-18  0:00               ` Ronald Cole
1998-10-19  0:00                 ` Jerry van Dijk
1998-10-20  0:00                   ` dennison
1998-10-18  0:00               ` Andi Kleen
1998-10-16  0:00           ` dewar
1998-10-16  0:00         ` Pascal Obry
1998-10-16  0:00           ` Donald Duck
1998-10-16  0:00             ` dewar
1998-10-19  0:00               ` Pascal Obry
1998-10-19  0:00                 ` dewar
1999-02-13  0:00             ` Fred J. McCall
1998-10-17  0:00         ` David C. Hoos, Sr.
1998-10-17  0:00           ` Jean-Pierre Rosen
1998-10-14  0:00     ` Gnat Executable Size geertbosch
1998-10-11  0:00 ` Lieven Marchand
1998-10-13  0:00   ` Robert B. Love 
1998-10-11  0:00 ` Niklas Holsti
1998-10-11  0:00   ` Corey Minyard
1998-10-12  0:00     ` Andi Kleen
1998-10-12  0:00 ` dennison
1998-10-12  0:00   ` Dave Wood [this message]
replies disabled

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