CPU vs Clock Time

来源:互联网 发布:linux history删除指定 编辑:程序博客网 时间:2024/06/05 05:28


CPU vs Clock Time

CPU time is the time required by the central peocessing unit to process instructions. It does not involve input/output waiting times (for example, when the code is waiting for the user to input some data and the user is taking a break).

On the other hand, wall clock time is the time taken to run a code as mesured by a regular clock. This will include all kinds of input/output operations and any processor idle time, also, if you are runnung 10 applications alongside your code, the wall clock time for your code will be obviously larger than if it was run only by itself.

CPU time is usually used to benchmark your code, but in reality, it is the wall clock time that really counts because if you start your code in the morning, and finishes by early evening, then that's when it really finished executing, not earlier as would most likely be reported by the CPU time. 


CPU vs Clock Time  http://blog.sciencenet.cn/blog-204718-261285.html

0 0