patch to suggest putc/fputs over printf("string") or printf("\n")
Jeffrey A Law
Sat Jan 16 14:04:00 GMT 1999
In message < 19990116111324.C1011@tantalophile.demon.co.uk >you write:
> Granted. What I really mean is: if a program already uses printf....
Ah. Yes, you're absolutely correct.
> Inline putc is usually much larger at the caller than calling printf.
> OTOH, putc when called as a function is nice and small at the caller.
Yup. I think we're in total agreement (now that we're talking about the
same thing :-)
> It would be nice to avoid pulling in the floating point conversions when
> possible :-)
Absolutely. That's why it originally came up internally at Cygnus. We get a
fair number of questions/complaints in this area. Some programmer does
fprintf (stream "error: %s", someerror);
Then they start asking why they sucked in the fp emulation code since they
know their code doesn't do any floating point operations.
Of course you and I know those *(&@#$ conversion routines all use floating
point, which caused the fp emulation libraries to get sucked in.
More information about the Gcc-patches