cout 與 printf 效率比較
平常寫 research code 比較沒什麼感覺。最近無聊寫起 UVa Online Judge 就對效能比較在意一點。
今天才知道原來 printf 比 cout 快、scanf 比 cin 快、\n 比 endl 快。
有興趣可以自己 print 一堆 hello world 出來試看看。我測的結果大致上是十比九左右。
Tags: C++, Efficiency, OlineJudge
. 10 Sep 08 | C++ | Comments (2)


