Hi, On Mon, Jul 28, 2014 at 7:11 AM, Dave Kerber <[email protected]> wrote: >> -----Original Message----- >> From: Mateusz Viste [mailto:[email protected]] >> Sent: Saturday, July 26, 2014 9:50 AM >> To: [email protected] >> Subject: Re: [Freedos-devel] OpenWatcom-produced binaries: >> why are they so big? >> >> I was just expecting that a modern compiler like OW >> would make more compact binaries than the 1988 Turbo C, but I >> guess that it's simply because Watcom's libc have more stuff in it, and it >> (probably?) don't perform any dead code elimination inside units.. > > My guess would be that modern compilers assume that the machine they're > being used on has enough RAM and HD space that the size of the binary > doesn't matter, and they either do no optimization at all, or optimize for > speed rather than size.
There's no end to the fiddling you could do to try to tweak things, but there is also no easy answer. Check your linker map. IIRC, OpenWatcom by default prefers somewhere in between "space" (-os) and "time" (-ot). Yup, quoting cguide.pdf (page 57): "By default, the compiler selects a balance between 'space' and 'time'". But I also assume you're already familiar with -ox (aka, -obmiler -s). I don't remember exactly what the "preferred" optimization switches are for most projects, but I recall seeing "-otexan" a lot. Though I don't use some of those (-oa) due to what I consider questionable behavior. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
