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,344332f209947007 X-Google-Attributes: gid103376,public From: Dave Wood Subject: Re: Gnat Executable Size Date: 1998/10/12 Message-ID: <3622EF5B.DBEDE54@cts.com>#1/1 X-Deja-AN: 400522319 Cache-Post-Path: wagasa.cts.com!unknown@arniek.cts.com Content-Transfer-Encoding: 7bit References: <6volj0$250$1@uuneo.neosoft.com> <6vt8dg$coj$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Deja Vous Productions Mime-Version: 1.0 Reply-To: dpw@cts.com Newsgroups: comp.lang.ada Date: 1998-10-12T00:00:00+00:00 List-Id: 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