D
Debaser
I've recently read in one of my old C books that puts() is a better
function call with regard to performance than printf() in the
following situation:
puts("Some random text");
vs.
printf("Some random text\n");
[Read: no formatting.]
Would anyone please confirm or deny this? It makes sense since
printf() uses vargs, but I'd like some confirmation. The author uses
void main() so I'm not sure what to think. Given today's hardware and
compiler optimizations I have no idea if it even matters. I'm not very
good at modern-day assembly, so I can't compare it that way.
I've generally steered away from the puts-gets I/O functions in the
past. I don't know why this is the case...maybe it has to do with
consistency as I don't always want the newline automatically output.
What's the word?
Thanks.
p.s. The book is by Herb Schlidt (or something similar) if that's any
indication.
function call with regard to performance than printf() in the
following situation:
puts("Some random text");
vs.
printf("Some random text\n");
[Read: no formatting.]
Would anyone please confirm or deny this? It makes sense since
printf() uses vargs, but I'd like some confirmation. The author uses
void main() so I'm not sure what to think. Given today's hardware and
compiler optimizations I have no idea if it even matters. I'm not very
good at modern-day assembly, so I can't compare it that way.
I've generally steered away from the puts-gets I/O functions in the
past. I don't know why this is the case...maybe it has to do with
consistency as I don't always want the newline automatically output.
What's the word?
Thanks.
p.s. The book is by Herb Schlidt (or something similar) if that's any
indication.