Saturday, May 22, 2010

In C/C++, is printf faster than cout?

Is there a difference in performance between printf and cout





and


scanf and cin. Please Help.

In C/C++, is printf faster than cout?
Cout and printf are both buffered file functions, so neither will be faster. There might be a microscopic lag in printf due to work done by the CPU to format printf, but that should be almost non-existant.


No comments:

Post a Comment