Re: Size of translated programs

new topic     » goto parent     » topic index » view thread      » older message » newer message

Rob wrote:

> Juergen Luethje wrote:

<snip>

>> When I run
>>    shroud -clear <prog>.exw
>>
>> before translating the program, the resulting exe file has a size of
>> only 144896 Bytes (7.8% smaller). Maybe sometimes even more than 7.8%
>> can be gained? I didn't do any statistical research so far. smile

see below

<snip>

> I think where the difference lies is that the shrouder is smart
> enough to delete unused atom constants and unused constants
> that are set to a side-effect-free expression,
> whereas the translator will keep those ones.
>
>> I'd like to suggest for Eu 2.5, that the translator would be as
>> effective as the shrouder in deleting unused stuff.
>
> Although they both delete unused stuff,
> the algorithms used by the Translator and the
> Binder/Shrouder are quite different. Some things
> aren't as easy to optimize in one versus the other,
> but I'll keep your suggestion in mind. Thanks.

I see. Thanks for the explanation.

I made some tests and found out, that the .exe size sometimes is
reduced _considerably_ by shrouding before translating. This applies
e.g. to several Win32Lib programs. I got the following results with
'boxes.exw', that ships with Win32Lib (version 0.58.08).


Translated for, and compiled with Borland C++ 5.5.1 Command-line
Compiler (size of .exe files in bytes):

normal    reduced
------    -------
811008     594432   ==>  26.7% smaller


Translated for, and compiled with Open Watcom C/C++ 1.0
(size of .exe files in bytes):

normal    reduced
------    -------
807424     590336   ==>  26.9% smaller


Regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu