Home Contact Sitemap

Team Programming Dragon.編程龍

Programming Art、C++、Python、Django、LinuxDev、HCI、Graphics、Web2.0。讓我們成為編程界的朝田龍太郎吧。

Beauty is Our Business

A Birthday Salute to Computer Scientist Edsger W. Dijkstra.

cout 與 printf 效率比較

平常寫 research code 比較沒什麼感覺。最近無聊寫起 UVa Online Judge 就對效能比較在意一點。

今天才知道原來 printf 比 cout 快、scanf 比 cin 快、\n 比 endl 快。

有興趣可以自己 print 一堆 hello world 出來試看看。我測的結果大致上是十比九左右。

Tags: , ,

. 10 Sep 08 | C++ | Comments (2)