comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@schonberg.cs.nyu.edu (Robert Dewar)
Subject: Re: Executable File Size Differences
Date: 1996/09/28
Date: 1996-09-28T00:00:00+00:00	[thread overview]
Message-ID: <dewar.843954745@schonberg> (raw)
In-Reply-To: 324D6631.4F3F@ghgcorp.com


Stanley said

"The problem is an old one: the lack of "smart linkers" which

would include only the necessary code from an Ada package, and

avoid linking in the unused bulk that never gets invoked.
"

In the case of GNAT, whether or not unused subprograms get eliminated
is a funcytion of the system linkers, since standard object file formats
are used. On some sysetms they will, on many they will not. In any case
the situation will be the same for Ada as for C.

In practice we find that the size of executables is reasonably comparable
with C. I assume no one is tryingf to sell Hello World programs for the
PC, so that comparison is hardly significant. With programs of reasonable
size, the code sizes are comparable. The difference you see between
Hello Wolrd in GNAT (about 55K bytes) and C (10K bytes) is, as I said
earlier, due to the static linking in GNAT vs DLL linking in C, and also
the fact that more of the standard functionality is brought in for a 
simple program (that's because Text_IO has a lot of capability that
the corresponding C routines do not).

But once you get to larger programs, that 40K bytes becomes an unimportant
difference.





  reply	other threads:[~1996-09-28  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-25  0:00 Executable File Size Differences Robert P. Kuzmicki
1996-09-25  0:00 ` Georgi Savov
1996-09-28  0:00   ` Stanley Allen
1996-09-28  0:00     ` Robert Dewar [this message]
1996-09-30  0:00     ` Richard A. O'Keefe
1996-10-01  0:00       ` Ken Cowan
1996-10-03  0:00         ` Stanley Allen
1996-10-04  0:00           ` Ada 95 - Performance vs. Pervasiveness (was: Executable File Size Diff Larry Kilgallen
1996-10-02  0:00   ` Executable File Size Differences Robert I. Eachus
1996-10-06  0:00     ` John Howard
1996-09-28  0:00 ` Simon FitzMaurice
1996-10-02  0:00 ` Jon S Anthony
1996-10-11  0:00 ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1996-09-28  0:00 Robert Dewar
1996-09-28  0:00 ` Tony Picarello
1996-09-29  0:00 tmoran
1996-09-29  0:00 ` Robert Dewar
replies disabled

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