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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a30a877db63b60c0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!134.158.69.22.MISMATCH!in2p3.fr!irazu.switch.ch!switch.ch!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Hello World 217Kb ? Date: Tue, 23 Nov 2004 18:54:39 +0100 Organization: None Message-ID: <3215061.MUKi6q0xaY@linux1.krischik.com> References: Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1101237322 01 25899 Mbk2XhRr4EAqr85 041123 19:15:22 X-Complaints-To: usenet-abuse@t-online.de X-ID: Vx4CCuZHYeCKsUf7Lq7LmmsoLY7llxv0JKd2qCBpfi4Iyqzu8jKpoh User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:6391 Date: 2004-11-23T18:54:39+01:00 List-Id: stephane richard wrote: > Hello everyone, > > I never noticed this before, never bothered to :-). But today it hit me > that the following program produces a rather huge exe size. > > With Ada.Text_IO; > procedure Hello is > begin > Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT"); > end; > > a whopping 217Kb (without debug information)...am I doing something wrong, > or is this the actual size of a basic exe file produced by Ada? The problem is that Ada.Text_IO is pretty large and unless you use "gnat elim" to optimize package use you get it all. > Compiled with GNAT 3.15p Maybe you shoul tried the "-shared" option. That will link the Ada runtime as DLL. And maybe you should try: With Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Line ("Hello World. Welcome to GNAT"); Ada.Text_IO.Put_Line ("Goodby World. See you later"); end; Double functionality (hello and goodby) for just a few bytes more! What a super bargain!! ;-) Well, this little joke should show you that the size of "Hello World" does not say anything about how a Language scales up in larger projects. i.E. double functionality does not mean double size. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com