计算圆周率后一万位所需要的时间,时间越短,单核性能越好
$ time echo "scale=10000; 4*a(1)" | bc -l -q
以下是成绩
树莓派3B 博通BCM2837B0
bc -l -q 475.68s user 0.00s system 99% cpu 7:55.68 total
树莓派4B 博通BCM2711
bc -l -q 221.00s user 0.00s system 99% cpu 3:41.88 total
腾讯云 E5-26xx v4
bc -l -q 127.81s user 0.05s system 98% cpu 2:09.55 total
bc -l -q 127.35s user 0.05s system 98% cpu 2:09.15 total
机房 Gold 6144
bc -l -q 84.19s user 0.34s system 99% cpu 1:24.19 total
macOS i7 3630QM
bc -l -q 103.41s user 0.59s system 99% cpu 1:44.04 total
macOS i7 7820HQ
bc -l -q 111.12s user 0.34s system 99% cpu 1:51.89 total
bc -l -q 111.44s user 0.38s system 99% cpu 1:52.26 total
Ubuntu 2600x
bc -l -q 94.46s user 0.01s system 99% cpu 1:34.50 total
bc -l -q 95.92s user 0.00s system 99% cpu 1:35.96 total
Ubuntu 3700x
bc -l -q 84.94s user 0.00s system 99% cpu 1:24.95 total
bc -l -q 83.09s user 0.01s system 99% cpu 1:23.11 total
macOS 8559U
bc -l -q 103.87s user 0.18s system 99% cpu 1:44.18 total
bc -l -q 102.74s user 0.21s system 99% cpu 1:43.16 total
macOS M1
bc -l -q 53.27s user 0.05s system 99% cpu 53.321 total
bc -l -q 53.69s user 0.05s system 99% cpu 53.736 total
Windows WSL i5 13600KF
bc -l -q 52.84s user 0.00s system 99% cpu 52.842 total
bc -l -q 53.16s user 0.00s system 99% cpu 53.162 total
Ubuntu E5 2697Av4
bc -l -q 87.71s user 0.00s system 99% cpu 1:27.72 total
bc -l -q 87.47s user 0.00s system 99% cpu 1:27.49 total
还记得以前在树莓派2b上编译安装ffmpeg过程真是漫长,跟性能羸弱有很大关系,同样是ARM架构的苹果M1,单核却是第一梯队的水平。
3630QM比7820HQ快可能跟ME664测试的时候负载极低有关系,不过Inter从3代到7代基本没啥进步实锤。
2023年,macOS13似乎更新了bc命令版本,计算性能提高了10倍,算这个圆周率大概只要5s多。