Modula2's godawful IO.
Michael I. Bushnell
mike at turing.UNM.EDU
Wed Apr 13 06:18:17 AEST 1988
In article <730 at mhuxm.UUCP> gak at 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 at turing.unm.edu Albuquerque, NM 87131
{ucbvax,gatech}!unmvax!turing.unm.edu!mike
More information about the Comp.lang.c
mailing list