C++ cout printing slowly
NOTE: This experimental result is valid for MSVC. In some other implementation of library, the result will vary. printf could be (much) faster than cout. Although printf parses the format string in runtime, it requires much less function calls and actually needs small number of instruction to do a same job, comparing to cout. Here … Read more