Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: parsing the format string at compile time... Keywords: format printf parsing modula-2 Message-ID: <20156@mimsy.UUCP> Date: 13 Oct 89 17:46:20 GMT References: <705@nixbur.UUCP> <10082@venera.isi.edu> Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 14 In article <10082@venera.isi.edu> lmiller@venera.isi.edu (Larry Miller) writes: >Parsing the format string is so incredibly trivial >that there can be no advantage of having to make >separate function calls for each data type like this. There is certainly no advantage to the programmer. The execution time, however, can be quite significant. One of the big speedups to the 4BSD VAX PCC-based C compiler was to change most of the printf() calls to fputs() calls (with fputs() being in VAX assembly, using special string instructions). The old _doprnt was in assembly as well, but was still significantly slower. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris