Dhrystone是一套基准程序,用来测试CPU的整数计算性能,不包括浮点运算。
还是用上次的设备:
- Intel Haswell Processor
- 主频 2.8GHz
- VxWorks 6.9 SMP
- GCC 4.3.3
- 循环20次,每次执行 1000,000 个Dhrystone
- 数据单位: 毫秒
-> dhrystone
1. Test (time for 1000000 number of loops): 58.000000
2. Test (time for 1000000 number of loops): 58.000000
3. Test (time for 1000000 number of loops): 58.000000
4. Test (time for 1000000 number of loops): 58.000000
5. Test (time for 1000000 number of loops): 58.000000
6. Test (time for 1000000 number of loops): 57.000000
7. Test (time for 1000000 number of loops): 58.000000
8. Test (time for 1000000 number of loops): 57.000000
9. Test (time for 1000000 number of loops): 58.000000
10. Test (time for 1000000 number of loops): 58.000000
11. Test (time for 1000000 number of loops): 58.000000
12. Test (time for 1000000 number of loops): 58.000000
13. Test (time for 1000000 number of loops): 58.000000
14. Test (time for 1000000 number of loops): 58.000000
15. Test (time for 1000000 number of loops): 57.000000
16. Test (time for 1000000 number of loops): 58.000000
17. Test (time for 1000000 number of loops): 58.000000
18. Test (time for 1000000 number of loops): 58.000000
19. Test (time for 1000000 number of loops): 58.000000
20. Test (time for 1000000 number of loops): 58.000000
Average Time over 20 runs: 57.850000 millisec
这是截图
为了对比,翻出来十几年前的一个数据
- Intel Processor
- 主频 1.8GHz
- VxWorks 5.5.1
- GCC 2.96
- 循环10次,每次执行 100,000 个Dhrystone
- 数据单位: 毫秒
30多倍的差距呀!据说这个测试,还会受到编译器的影响,看来是真的