霍鉅的文章提到提到:
..., 用计算圆周率的办法来测试cpu性能:
time echo "scale=5000; 4*a(1)" | bc -l -q
过了4,5分钟都没算出来结果。基本可以定位问题在CPU上。
沒看懂這個命令,求解釋一下
● man bc
a (x) The arctangent of x, arctangent returns radians.
● bc --help
usage: bc [options] [file ...]
-h --help print this usage and exit
-i --interactive force interactive mode
-l --mathlib use the predefined math routines
-q --quiet don't print initial banner
-s --standard non-standard bc constructs are errors
-w --warn warn about non-standard bc constructs
-v --version print version information and exit
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。