Xref: utzoo comp.lang.modula2:772 comp.lang.misc:1434 comp.lang.c:9263 comp.lang.pascal:807 Path: utzoo!mnetor!uunet!husc6!think!bloom-beacon!tut.cis.ohio-state.edu!mailrus!nrl-cmf!cmcl2!beta!unm-la!unmvax!turing.UNM.EDU!mike From: mike@turing.UNM.EDU (Michael I. Bushnell) Newsgroups: comp.lang.modula2,comp.lang.misc,comp.lang.c,comp.lang.pascal Subject: Re: Modula2's godawful IO. Message-ID: <942@unmvax.unm.edu> Date: 12 Apr 88 20:18:17 GMT References: <764@ndsuvax.UUCP> <535@m10ux.UUCP> <730@mhuxm.UUCP> Sender: news@unmvax.unm.edu Reply-To: mike@turing.UNM.EDU.UUCP (Michael I. Bushnell) Organization: University of New Mexico, Albuquerque Lines: 33 In article <730@mhuxm.UUCP> gak@mhuxm.UUCP (Vincent Hatem) writes: >Besides, the whole idea of the WriteCard()-style I/O system is to remove the >20K overhead that printf() adds to programs. 95% of the functionality of >printf() is never used, and you're just making your text segment larger. On 4.3 BSD on a Vax, I get the following: % size doprnt.o text data bss dec hex 2196 36 0 2232 8b8 % size printf.o text data bss dec hex 40 36 0 76 4c To use printf, it ups your text segment by a whole 2236 bytes. Wow. It also isn't too slow: 4.3BSD doprnt is coded in assembly language and manages to be quite fast. Puts is about 10% of that (200 bytes) but isn't really any faster. But CERTAINLY NOT a "20K" overhead. Go ahead and use printf. It doesn't really cost you that much. N u m q u a m G l o r i a D e o Michael I. Bushnell HASA - "A" division 14308 Skyline Rd NE Computer Science Dept. Albuquerque, NM 87123 OR Farris Engineering Ctr. OR University of New Mexico mike@turing.unm.edu Albuquerque, NM 87131 {ucbvax,gatech}!unmvax!turing.unm.edu!mike