comp.lang.ada
 help / color / mirror / Atom feed
From: davidf@deci.mks.com (David J. Fiander)
Subject: Re: GNAT Codesize
Date: 1996/06/25
Date: 1996-06-25T00:00:00+00:00	[thread overview]
Message-ID: <4qolqi$4nl@deci.mks.com> (raw)
In-Reply-To: Pine.GSO.3.93.960624191009.17694A-100000@sky.net


According to John Howard <jhoward@sky.net>:
>
>Below are my Turbo Pascal and two GNAT v3.05 results.
>
>program HelloWorld;
>begin
>  writeln('Hello, world');
>end.
>
>>tpc hello.pas
>
>The Borland Turbo Pascal v7.0 produces:
>HELLO    EXE      2192   6-24-96  7:33p
>
>The DJGPP version (GNAT v3.05) produces:
>HELLO    ADB        91   6-24-96  8:21p
>HELLO    ALI       749   6-24-96  8:39p
>HELLO    O         519   6-24-96  8:39p
>HELLO    EXE     83456   6-24-96  8:40p
>
>The OS/2 version (GNAT v3.05) produces:
>HELLO    ADB        91   6-24-96  8:21p
>HELLO    ALI       749   6-24-96  8:22p
>HELLO    O         237   6-24-96  8:22p
>HELLO    EXE    263355   6-24-96  8:22p

Checking the size on disk is pretty pointless if the file
contains debugging symbol tables because no O/S (not even DOS)
will load the debugging information into memory.  More
interesting is the output of the "size" command, which displays
the size of the text, data, and bss regions (or their DOS
equivalents).


	with Ada.Text_IO;
	use Ada;

	procedure Main is
	begin
	   Text_IO.Put_Line("Hello, world");
	end Main;

GNAT 3.05 on Solaris produces:

	worf=(); size thello
	36756t + 708d + 1724d + 4500b = 43688 (aaa8)

while the file size is

	worf=(); ls -l thello
	-rwxr-xr-x   1 davidf   r+d       116904 Jun 21 10:23 thello

So, half the disk file is debugging info.  Of course, using
Gnat_IO:

	with Gnat.IO;

	procedure Main is
	begin
		Gnat.IO.Put_Line("Hello, world");
	end Main;

gives me a size of

	worf=(); size ghello
	2888t + 250d + 408d + 2616b = 6162 (1812)

Mostly because Gnat.IO doesn't suck in all the exception, finalization,
streams, and unused text code that Ada.Text_IO does.

- David




  parent reply	other threads:[~1996-06-25  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-20  0:00 GNAT Codesize Haug Buerger
1996-06-20  0:00 ` James E. Hopper
1996-06-21  0:00 ` Doug Smith
1996-06-21  0:00 ` Robert Dewar
1996-06-24  0:00   ` John McCabe
1996-06-24  0:00     ` John Howard
1996-06-25  0:00       ` Robert Dewar
1996-06-25  0:00       ` David J. Fiander [this message]
1996-06-26  0:00     ` Robert Dewar
1996-06-28  0:00       ` Fergus Henderson
1996-07-01  0:00         ` Michael Feldman
1996-07-03  0:00           ` John McCabe
1996-07-02  0:00         ` John McCabe
1996-07-03  0:00           ` Robert Dewar
1996-07-06  0:00             ` John McCabe
1996-07-06  0:00               ` Robert Dewar
1996-07-06  0:00               ` Michael Feldman
1996-07-08  0:00             ` Gavin Smyth
1996-06-28  0:00       ` John McCabe
1996-06-28  0:00         ` Fergus Henderson
1996-06-29  0:00           ` John McCabe
1996-07-01  0:00             ` Robert Dewar
1996-07-05  0:00               ` John McCabe
1996-07-05  0:00             ` JP Thornley
1996-06-30  0:00         ` Robert Dewar
1996-07-02  0:00           ` John McCabe
1996-07-03  0:00             ` Robert Dewar
1996-07-03  0:00   ` Question about the need for requeue as described in Rationale James A. Squire
1996-07-05  0:00     ` Bo I. Sanden
1996-07-05  0:00       ` progers
1996-07-06  0:00     ` Robert A Duff
1996-07-04  0:00   ` Samuel Tardieu
1996-07-04  0:00     ` Robert Dewar
1996-07-08  0:00   ` James A. Squire
1996-07-08  0:00   ` James A. Squire
1996-07-08  0:00     ` Robert A Duff
1996-07-09  0:00     ` Bo I. Sanden
1996-07-08  0:00   ` James A. Squire
1996-07-09  0:00     ` progers
1996-07-10  0:00     ` Robert A Duff
1996-07-10  0:00       ` progers
1996-07-09  0:00   ` Jon S Anthony
1996-06-21  0:00 ` GNAT Codesize Ralph Paul
1996-07-08  0:00 ` Question about the need for requeue as described in Rationale James A. Squire
replies disabled

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