一秒开方数判断计算机处理器性能
😂 这篇文章最后更新于1225天前,您需要注意相关的内容是否还可用。
CodeSheep上看到的,不知道可不科学,i5三代低压U老电脑最高三千五百万每秒,骁龙865手机一千万每秒。
for (int i = 0; i < 10; i++) {
long start = System.currentTimeMillis();
long end = start + 1000;
long count = 0;
while (true) {
Math.sqrt(count);
if (end < System.currentTimeMillis()) {
break;
}
++count;
}
System.out.println(count);
}
留言评论
暂无留言