parsing the format string at compile time...
Chris Torek
chris at mimsy.UUCP
Sat Oct 14 03:46:20 AEST 1989
In article <10082 at venera.isi.edu> lmiller at 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 at cs.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list