System time for parallel and serial processing

谁都会走 提交于 2019-12-05 07:46:04

It appears to me that both of the workers are doing as much work as is performed in the sequential version. The workers should only perform a fraction of the total work in order to execute faster than the sequential version of the code. That might be accomplished by dividing mcmc by the number of workers in this example, although that may not be what you real want to do.

I think that explains the long elapsed time reported by system.time. The "user" and "system" times are short because they are times for the master process which uses very little CPU time when executing parLapply: the real CPU time is used by the workers which isn't being reported by system.time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!