View Single Post
Old Feb 23rd, 2005, 12:45 PM   #14
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
As a first line of defence though you may want to consider making these changes in your source code (if and when that is applicable)..

1) Optimize for file size... usually /Os compiler argument, this will make your file output considerably smaller in most cases, some compilers default for /O2 which is a speed optimization which does not care about output file size (though there is an ever ongoing debate that smaller files mean faster execution anyway)...

2) Make sure you are stripping all of your debug code out. In linux you run strip to remove debug information from your output files, in Windows you tell your compiler not to generate debug information, this means line numbers, stack information, and so forth...

3) Dynamically link as many libraries as you possibly can! Some compilers give you the option to dynamically or statiscally link runtime libraries, Borland for instance gives you this ability, while statically linking libraries I find is more convenient it does greatly enlarge the file size...

4) Do not use RTTI, RTTI causes your files to become CONSIDERABLY larger...

5) Use generics instead of templates, templats cause code and compile explosions, while most optimizers may be able to work around the results of code explosion I can promise they will likely not be very effective at it...
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote