comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: Ada vs. C
Date: 1996/08/11
Date: 1996-08-11T00:00:00+00:00	[thread overview]
Message-ID: <Dvyt3I.2C@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 320B693F.4ACA@freenet.scri.fsu.edu


The Quelisher (kendal@freenet.scri.fsu.edu) wrote:

: Robert Dewar wrote:
: > That's bogus, comparable programs in Ada and C will generate 
: > executables of the same size, at least using a technology like GNAT. 

: 		printf("Hello world! \n");

: 	  Put_line("Hello world!");

: When I compiled each of the above here are the file sizes that resulted:
: 	C ----> 24,576
: 	Ada -->	253,952

To me this looks like comparing a C program using shared libraries to a
statically linked Ada program...

Besides, what do you think you are comparing here ? With only one line
of executable code, the programs mainly consist of the program start-up
code and runtime library. And then I would expect the GNAT executable to
be somewhat larger then the C one, since the GNAT RTL contains more
functionality (like tasking).

If you really want to compare executable file sizes, you should use two 
equivalent programs, large enough to make size of the RTL insignificant
compared to the code size.

But, then, whats the point to it...

P.S. Under DOS a GNAT hello world is about 87K, a gcc one about 57K.
     If I were to use a 16-bit C compiler I would expect a 6K exe size.
     Using an embedded systems compiler would bring that down to about
     500 bytes. If that is still to big, handwritten assembler will
     get away with about 40 bytes.





  parent reply	other threads:[~1996-08-11  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-07  0:00 Ada vs. C The Quelisher
1996-08-09  0:00 ` Daniel P Hudson
1996-08-09  0:00   ` Robert Dewar
1996-08-09  0:00 ` Jack W Scheible
1996-08-09  0:00 ` Robert Dewar
1996-08-09  0:00   ` The Quelisher
1996-08-10  0:00     ` Bob Kitzberger
1996-08-10  0:00     ` steved
1996-08-10  0:00       ` Robert Dewar
1996-08-10  0:00     ` Robert Dewar
1996-08-11  0:00     ` Jerry van Dijk [this message]
1996-08-11  0:00     ` Dave Wood
1996-08-14  0:00       ` busigin
1996-08-16  0:00         ` Robert Dewar
1996-08-12  0:00   ` Vladimir Vukicevic
  -- strict thread matches above, loose matches on Subject: below --
1995-01-20  4:43 "Subtract C, add Ada" Samuel Mize
1995-01-21 20:28 ` David O'Brien
     [not found]   ` <3g655n$q5k@theopolis.orl.mmc.com>
1995-01-30 15:33     ` Ada vs. C Martijn Bak
replies disabled

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