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")


> - Splitting printf("foo %s", str) into two function calls will almost always
>   result in larger code.

This may result in _slower_ code, as some implementations of printf()
turn on buffering temporarily if the stream is unbuffered, that is,
"foo " and str may be written with one write() call instead of two.

-- 
  Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>


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