Date: Thu, 28 Mar 1996 16:37:28 +0200 (IST) From: Eli Zaretskii To: bonni mierzejewska Cc: djgpp AT delorie DOT com Subject: Re: Exe size In-Reply-To: <31595fc0.4803520@wvnvm.wvnet.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 27 Mar 1996, bonni mierzejewska wrote: > I'm too new to DOS to know why a programme compiled with a 32-bit compiler > is always bigger than the same programme compiled with a 16-bit compiler. First, don't forget to run `strip' on your program (or link with -s), or else you get debugging info/symbols with the GCC executable. Second, I think many 32-bit opcodes are longer than their 16-bit brethren. Third, last time I checked BCC (16-bit) and GCC produced very similar sizes of executables for a non-trivial program, the above gotchas notwithstanding (I *did* remember to strip, though). Last, but not least, the DJGPP C library is much more powerful than the one that comes with BCC. For example, the DJGPP's `rename' function can move entire directories. This functionality comes for a price of larger code, which every program gets even if it doesn't need those features. Oh, and don't use -O3 unless you absolutely need it (profile before you decide): it bloats the executable but in most cases doesn't gain you anything runtime-wise. In fact, in many cases I saw decrease in speed. -O2 is more than enough in most cases.