摘要: 写了个小程序测试了一下cout函数和printf函数的效率,看来printf函数的确效率要高不少。 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 long sTime, eTime, timeForCout, timeForPrintf; 8 int a[30000]; 9 10 int i;11 for (i = 0; i < 30000; i++) {12 a[i] = i;13 }14 15 sTime = clock();16 ... 阅读全文
posted @ 2013-12-02 01:44 Chanson Shen 阅读(392) 评论(0) 推荐(0) 编辑