Why is istream/ostream slow

后端 未结 4 1574
-上瘾入骨i
-上瘾入骨i 2020-12-04 17:51

At 50:40 of http://channel9.msdn.com/Events/GoingNative/2013/Writing-Quick-Code-in-Cpp-Quickly Andrei Alexandrescu makes a joke about how not efficient/slow istream is.

4条回答
  •  失恋的感觉
    2020-12-04 18:28

    On a similar topic, STL says: "You can call setvbuf() to enable buffering on stdout."

    https://web.archive.org/web/20170329163751/https://connect.microsoft.com/VisualStudio/feedback/details/642876/std-wcout-is-ten-times-slower-than-wprintf-performance-bug-in-c-library

提交回复
热议问题