Variable argument lists.

Richard A. O'Keefe ok at quintus.UUCP
Sun May 22 15:10:29 AEST 1988


In article <4824 at ihlpf.ATT.COM>, nevin1 at ihlpf.ATT.COM (00704a-Liber) writes:
> As you have stated, *printf is used a lot.  For this reason alone, I want
> it to be as fast as possible.

The best way to do that would seem to be for the compiler to macro-expand
*printf() to a sequence of simple procedure calls (when it can, which is
when the format argument is a literal, as it usually is).  Now that ANSI C
defines *printf(), a compiler may safely do so.

[I cut my computational teeth on a B6700, where the Fortran and Algol
compilers handled formats at compile-time.  It came as an unpleasant
shock to me to find that the rest of the world still interpreted them.]



More information about the Comp.lang.c mailing list