设为首页 加入收藏

TOP

CPU测试程序代码,Windows VS Linux
2014-11-24 01:25:48 来源: 作者: 【 】 浏览:1
Tags:CPU 测试 程序 代码 Windows Linux

一直想估计一下自己的cpu每秒能大概运算多少次


#include
#include
using namespace std;
int main(){
time_t one, two, three;
one=time(NULL);
two=time(NULL)+2;
three=time(NULL)+1;
int x=0;
while(two!=one) {
one=time(NULL);
if(three==one) x++;
}
cout<return 0;
}


测试结果 amd 2000+ ddr400 512M Windows xp vc++6


108万次左右 每秒


赛扬400MHZ sdram pc100 128M linux mandrake8 gcc 2.9.6


123万次左右 每秒


结果很意外 难道400MHZ能跑过1.58GHZ的cpu,或者Linux比Windows强悍这么多?


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Flex与Java交互之数据库数据读取 下一篇探秘Google App Engine for Java

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: