delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/08/07:43:49

Date: Mon, 8 Jul 1996 15:39:00 +0400 (MSD)
From: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
Message-Id: <199607081139.PAA16948@video.yars.free.net>
To: djgpp AT delorie DOT com
Subject: Re: Executable size

> >What can be done about the large size of the executables
> >produced by gcc?  A "hello world" program is bloated at
> >57kb. I used the -O switchs, but that produced no change.
> >What can be done about this?
> 
> As has been said many, many, many times before, a hello world is
> not a realistic test case to determine the size of a compiler's output.
> DJGPP programs have about 40-50K or so of overhead which includes
> invoking DPMI, parsing the command line, loading environment
> variables, and passing the argc and argv parameters to main().

BTW, the size of "hello world" program grows with the version number of
Borland C. I don't remember the exact sizes, but approximately
the growth looks like:

[Turbo C 2.0] ---> [Borland C++ 3.1] ---> [Borland C++ 4.5]
    6k                   15k                    30k

(those sizes belong to *real mode* DOS executable)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019