> -----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?
>
> Hi Eric,
>
> No, I didn't try to optimize the code by removing printf()
> and friends.
> It's not such a big deal in fact - with Turbo C my code computed a
> binary of ~13K, and with OW it is more like ~21K. Both compile a real
> mode, 16bit binary. 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.


>
> But you're right of course, I will take a look at the options
> used by FD
> kernel, maybe I missed the -enable-small-binaries switch I
> was looking
> for :)
>
> cheers,
> Mateusz
>
>
>
> On 07/26/2014 02:36 PM, Eric Auer wrote:
> >
> > Hi!
> >
> >> I'm quite surprised to notice that on average, the
> binaries produced by
> >> OW are twice as big as the same code compiled using Turbo C.
> >
> > Have you tried the usual stuff, such as avoiding heavier
> > constructs like file streams and printf formatters? There
> > might be some lighter alternative C libraries for OW as
> > well, but I remember that the FreeDOS kernel size is not
> > bad with OW - have a look at which compile switches that
> > uses and which library functions it avoids ;-) Note that
> > 16 vs 32 bit compile may make a big difference.
> >
> > Cheers, Eric
>
> --------------------------------------------------------------
> ----------------
> Want fast and easy access to all the code in your enterprise?
> Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Freedos-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>

------------------------------------------------------------------------------
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

Reply via email to