comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Size of linked program increasing with new version of GNAT.
Date: Wed, 31 Dec 2014 13:45:59 +0100
Date: 2014-12-31T13:45:59+01:00	[thread overview]
Message-ID: <lndbstazz46d$.82hq0dieuouh$.dlg@40tude.net> (raw)
In-Reply-To: e2493e16-17b3-4228-8e82-b664783ec207@googlegroups.com

On Wed, 31 Dec 2014 04:08:13 -0800 (PST), Jean François Martinez wrote:

> If we intend is to measure the actual quality of the compiler at
> generating small code then the significtaive variable is the size of the
> .o file not the size of the executable.

I remember a FORTRAN-IV compiler that generated direct and indirect code.
The latter was kind of interpreted, each code "instruction" was a jump to a
short subprogram implementing the semantics. The direct code was twice as
large than the indirect one and 50% faster. So, no, the size of object
files tells nothing.

> The executable is parasited by
> things like runtime, libraries, dynamic linker (or first stage of dynamic
> linker) and so on.

The code size can be approximated by a linear function A + B*x, where x is
the program "complexity". Arguments that A might be irrelevant is true only
if B is correspondingly small compared to the alternatives so that with
growing x you could compensate your losses on A.

Regarding GNAT, I doubt that B is really small, especially if generics are
actively used, and A is substantially big has we all know.

> So the more capable your environment and the biggest the program.

Which should be the opposite, actually, since you could get some
functionality from for the environment. 

The problem is that the ratio capability/useless-garbage is quite low in
modern environments and the trend is that it rapidly nears zero.

> So if the program is small and will run it on a half decent box you don't
> care. Remember the EEPC, that five years old laptop good for web surfing
> and little more?  It had 1G of memory. A million Ks.  So who cares about
> the size of hello world?

The empiric law of SW teaches us that any resource available will be
consumed. A more specialized law, which is a consequence of the former, is:
Windows is here to make i486 out of any i7.

> If your program has megs and megs of code then the overhead due to a more
> capable runtime will be completely irrelevant respective to the "pure"
> (that is .o) size of your program and third party (ie not related to Gnat)
> libraries.

Which code must be linked dynamically or else, on the systems without
virtual memory, loaded into to RAM. Thus large A usually directly
translates into longer starting times. The effect we all know, each new
system, each new version takes 20% more time to start.

The time a program needed to start is a good estimation of the product line
age. E.g. compare start times of:

Borland C++
MS Visual Studio
AdaCore GPS

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2014-12-31 12:45 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
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 [this message]
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