Conclusion, but maybe stdout is protected by a lock?
In general, printf is an expensive operation because it interacts with other resources (such as files, console, etc.).
My empirical experience is that printf is very slow on the Windows console, relatively much faster on the Linux console, but faster if redirected to a file or / dev / null.
I found that debugging printf can seriously affect the performance of my applications, and I use it sparingly.
, , /dev/null, , - ; .
, printfs , ?