[comp.lang.c] Final postscript on the printf

gnu@hoptoad.uucp (John Gilmore) (03/27/88)

One thing it seems everybody missed is that if printf() is slower than
puts(), the thing to do is not to rewrite all your programs to use puts(),
or change the compiler to convert printf() to puts(); the thing to do is
speed up the common cases of printf()!

Chris Aoki and I did this at Sun, years ago, when a new-hire in the
compiler group was wasting his time changing printf()s to puts()s.  An
hour's worth of work resulted in speeding up *every* program, not just
the ones we had time to manually edit puts()'s into.  It's now about
equally fast on Suns to printf() a string or puts() it, as it ought to
be.  After all, it's really the same loop, with one extra test for %!
-- 
{pyramid,ptsfa,amdahl,sun,ihnp4}!hoptoad!gnu			  gnu@toad.com
		"Watch me change my world..." -- Liquid Theatre