Why you should use puts(3) when you don't need printf(3)

Alan J Rosenthal flaps at dgp.toronto.edu
Wed Mar 16 13:14:36 AEST 1988


rwl at uvacs.CS.VIRGINIA.EDU (Ray Lubinsky) writes:
>But what ever happened to run time-efficiency?  The point of using
>fputs(3) is that it just pushes bytes to the output!  Fprintf(3) has to
>scan its first argument and gyrate around to get to the point where it
>pushes bytes.

On the Amiga using the Manx Aztec C compiler (v3.20a), puts() takes a
noticeable amount of time and printf() does not.  Your efficiency theories
are wrong.  (I have no idea what puts() is doing for so long.)

ajr
-- 
If you had eternal life, would you be able to say all the integers?



More information about the Comp.lang.c mailing list