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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: dennison@telepath.com Subject: Re: Gnat Executable Size Date: 1998/10/12 Message-ID: <6vt8dg$coj$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 400221915 References: <6volj0$250$1@uuneo.neosoft.com> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Oct 12 15:49:04 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I) Date: 1998-10-12T00:00:00+00:00 List-Id: 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