This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch to suggest putc/fputs over printf("string") or printf("\n")


On Sat, Jan 16, 1999 at 04:03:57AM -0700, Jeffrey A Law wrote:
>   > - putc is almost always larger than printf, though much faster.
> Huh?  Consider how much conversion code you bring in to handle floating point
> via printf...  It's utterly amazing.
> 
>   > - puts requires separate library code, when just printf would have done.
>   >   Often, the calling sequence is the same for both.
> printf's library support code is quite large due to the conversions...

Granted.  What I really mean is: if a program already uses printf....
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.

It would be nice to avoid pulling in the floating point conversions when
possible :-)

-- Jamie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]