comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Size of linked program increasing with new version of GNAT.
Date: Mon, 29 Dec 2014 17:56:42 -0600
Date: 2014-12-29T17:56:42-06:00	[thread overview]
Message-ID: <m7spnq$1lc$1@loke.gir.dk> (raw)
In-Reply-To: db4a0ed9-d5e8-40ea-8def-0683c98584fb@googlegroups.com

"Tony" <tony7@tele2.se> wrote in message 
news:db4a0ed9-d5e8-40ea-8def-0683c98584fb@googlegroups.com...
> On Saturday, December 27, 2014 7:43:14 AM UTC+1, Simon Wright wrote:
>> A main program with a null body, compiled with -O2 and stripped,
>> resulted in executable size 83540;
>
> I'd expect that program to be compiled into a single machine code return 
> instruction.
>
> I managed to create a 12 KB version of Hello-World, by excluding runtime 
> and
>Ada.Text_Io and calling Win32 functions directly:

So what?

(1) I created a 56KB executable by using Janus/Ada on a simple Hello world 
program using Text_IO. (Options: /zt/f).

(2) I could shrink that further to 38K by using RRText_IO instead of 
Text_IO. (Text_IO has lots of overhead from maintaining line and column 
counts that are almost never used; RRText_IO originated in our early CP/M 
compilers [the ones that had to run in 48K RAM - code and data] and is 
simpler but still has most of the useful capabilities.)

(3) But still, who cares? Im my experience with a variety of Ada compilers, 
there's no correlation between the minimum size of a program and the size of 
real programs. And programs that don't use at least some of exceptions, 
controlled types, tasks, floating point, images, and other expensive 
operations are hardly using Ada at all. The size of Hello world tells one 
very little about the size and efficiency of a real program.

                                   Randy.




  parent reply	other threads:[~2014-12-29 23:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-25 17:44 Size of linked program increasing with new version of GNAT Tony
2014-12-25 17:57 ` Björn Lundin
2014-12-25 18:36   ` tony7
2014-12-25 19:41     ` Björn Lundin
2014-12-25 20:04       ` Shark8
2014-12-25 20:15       ` tony7
2014-12-25 21:23         ` Shark8
2014-12-25 22:48           ` Peter Chapin
2014-12-27  1:39             ` Randy Brukardt
2014-12-27  6:43               ` Simon Wright
2014-12-27 18:25                 ` Tony
2014-12-27 23:18                   ` Simon Wright
2014-12-29 23:56                   ` Randy Brukardt [this message]
2014-12-30 15:21                     ` Björn Lundin
2014-12-30 17:45                     ` Tony
2014-12-30 21:58                       ` Randy Brukardt
2014-12-30 23:51                         ` Shark8
2014-12-31 12:08                     ` Jean François Martinez
2014-12-31 12:45                       ` Dmitry A. Kazakov
2015-01-01 12:28                         ` Georg Bauhaus
2014-12-26 14:32 ` Pascal Obry
2014-12-26 15:48   ` J-P. Rosen
2014-12-26 15:55   ` Simon Clubley
2014-12-26 20:14     ` Tony
2014-12-27  1:48       ` Randy Brukardt
2014-12-27  9:35     ` Pascal Obry
2014-12-27 21:17     ` Jean François Martinez
replies disabled

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