It's almost certainly true. Writing to the terminal is notorious for slowing things down. Run your program and redirect the output to a file and see how much faster it is. Then take out the output statement entirely and measure again. You'll see the behaviour immediately.
Here's a braindead example:
#include <stdio.h>
int main(void)
{
int i;
for (i = 0; i < 10000; i++)
{
printf("Hello, world!\n");
}
return 0;
}
I built this program unoptimized and ran it, once with output to the terminal, and once with output to a file. Results for the terminal output:
real 0m0.026s
user 0m0.003s
sys 0m0.007s
Results for redirected I/O:
real 0m0.003s
user 0m0.001s
sys 0m0.001s
There you go, ~8x faster. And that's for a very small number of prints!