delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/25/18:46:11

Message-Id: <199711252343.SAA22297@delorie.com>
From: "sl" <SL AT usemail DOT com>
To: "DJGPP mailing list" <djgpp AT delorie DOT com>,
"aho450s AT nic DOT smsu DOT edu" <aho450s AT nic DOT smsu DOT edu>
Date: Tue, 25 Nov 97 18:49:22
Reply-To: "sl" <SL AT usemail DOT com>
MIME-Version: 1.0
Subject: Re: Excessive exe sizes

On Tue, 25 Nov 1997 06:35:31 -0600, Tony O'Bryan wrote:

>	That depends on the situation, of course.  For allocating arrays that
>are auto-initialized, how else is the program to know what values the
>array should have at startup?  Have the program code fill the array at
>run-time?  That takes much more disk space to write the code overhead. 
>The only optimization in this case (that I can think of) is to have gcc
>check if the array is hard coded to autoinitialize to all zeros.  If so,
>then the startup code could be generated to run a small loop to write
>zeros to all locations.  That case would eliminate disk bloat for large
>global arrays.

	And this is exactly what SHOULD be done. Out of all optimizations which GCC does this should be 
the easier to implement.

Gili

- Raw text -


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