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.843920181@schonberg> (raw)
Robert said
"I tried compiling a simple "Hello World" program with the Thomson Software's Act
ivAda for Windows
and Thomson's new "ObjectAda". The ActivAda version produces a executable file s
ize of about 288K.
ObjectAda produces an exe of about 788K. Microsoft C++ produces an exe of about
10K. Why are the
executables so substantially different? Are the Ada compilers linking in alot of
excess baggage? I
have tried various compiler switches, but nothing seems to shrink the exe file s
izes.
Can anyone enlighten me here?"
(P.S. please keep your posts to 80 characters, really makes life easier!)
The GNAT executable under OS/2 is 57K, which is smaller but still larger
than the 10K you see from C. There are two reasons for this. First, it is
likely that the C is linking against a dynamically shared library which
is taking up room, but does not show up in the 10K. Second, GANT is
indeed dragging in quite a bit, including full exception support, full
support for controlled types, full support for tagged types. In a small
program this makes for some extra size, but of course this is a fixed size
increment, if you make a larger program, it does not get proportionally
bigger.
For example, I just wrote a complete preprocessor program for GNAT (toi be
included in some future release!) that provides conditional compilation
capability, and symbol substitution capability, including nested
conditoinals, with quite a bit of flexibility. This program also uses
Text_IO, but the executable is only 81K. It is a 1000 line program
with 534 non-blank non-comment lines, so it is about 100 times the length
of hello world in source lines, but certainly not 100 times the length
in the executable!
I would guess that you would see the same phenomenon with ObjectAda, i.e.
that there is a fair amount of fixed overhead, but it does not go up
with the size of the source file in linear proportion.
next reply other threads:[~1996-09-28 0:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-28 0:00 Robert Dewar [this message]
1996-09-28 0:00 ` Executable File Size Differences Tony Picarello
-- strict thread matches above, loose matches on Subject: below --
1996-09-29 0:00 tmoran
1996-09-29 0:00 ` Robert Dewar
1996-09-25 0:00 Robert P. Kuzmicki
1996-09-25 0:00 ` Georgi Savov
1996-09-28 0:00 ` Stanley Allen
1996-09-28 0:00 ` Robert Dewar
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-02 0:00 ` 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox