Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c Subject: Re: Compressing C programs Message-ID: <531@bbxsda.UUCP> Date: 8 Jan 90 21:56:05 GMT References: <1990Jan7.161841.6470@druid.uucp> <7600@hubcap.clemson.edu> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 20 In article <7600@hubcap.clemson.edu> grimlok@hubcap.clemson.edu (Mike Percy) writes: >If you can avoid using printf, do so. Printf drags in a large routine. >Many times you can use puts rather than printf. In my experience, puts >is not only smaller than printf, but faster. > >Another thing in TurboC to avoid if possible is dragging in the floating >point libraries when you don't need them. This is probably the main reason a small program would create a large .EXE file. Using printf() will cause the floatingpoint library to be linked in unless you tell Turbo C not to bother (I can't remember the switch off hand). Without the floatingpoint library, printf() is not very large. Also, I agree that using puts() whenever possible is a good idea even if you are also using printf() just for speed. -- Scott Amspoker Basis International, Albuquerque, NM (505) 345-5232 unmvax.cs.unm.edu!bbx!bbxsda!scott