我有一个程序使用 pthread 库来执行 500x500 矩阵的矩阵乘法。每个线程计算矩阵的 50 行。
当我计时它的执行时:
shadyabhi@shadyabhi-desktop:~$ time ./a.out
real 0m0.383s
user 0m0.810s
sys 0m0.000s
shadyabhi@shadyabhi-desktop:~$
为什么系统+用户大于实时?
最佳答案
它更大,因为它将所有核心的时间加在一起。
关于linux - 为什么 sys+user > real 在 "time command"中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2461499/