通过并行性最大化处理速度

时间:2022-09-14 15:20:56

Are there any cases in which anything more than a linear speed increase comes from parallelising an algorithm ?

是否存在任何比线性速度增加更多来自并行化算法的情况?

2 个解决方案

#1


The maximum you can reach from a theory viewpoint is linear speedup. In practice, it is possible super linear speedup. If you can distribute your problem in a away that you can leverage effects of processor caches, e.g. because it does not fit in the cache of a single core, your problem can scale better than linear.

从理论角度来看,你可以达到的最大值是线性加速。在实践中,有可能超线性加速。如果您可以在远离地分发您的问题,您可以利用处理器缓存的影响,例如因为它不适合单个内核的缓存,所以您的问题可以比线性更好地扩展。

#2


In theory, no - but in practice this might be the case (depending on the underlying hardware and your specific problem). Its not trivial to compare parallel and sequential code (you have to compare the fastest sequential implementation with your parallel implementation, not just your parallel implementation running on a single processor/thread).

理论上,没有 - 但在实践中可能就是这种情况(取决于底层硬件和您的具体问题)。比较并行和顺序代码并不简单(您必须将最快的顺序实现与并行实现进行比较,而不仅仅是在单个处理器/线程上运行的并行实现)。

But still, when someone speaks about more-than-linear speed-up I would always be suspicious; they either didn't measure it correctly (see above), measured an artifact (hardware/OS dependent) and should document it accordingly, or this only works for a specific combination of problem/implementation/hardware.

但是,当有人说出超过线性的加速时,我总是会怀疑;他们要么没有正确测量它(参见上文),测量工件(硬件/操作系统相关)并应相应地记录它,或者这仅适用于问题/实现/硬件的特定组合。

#1


The maximum you can reach from a theory viewpoint is linear speedup. In practice, it is possible super linear speedup. If you can distribute your problem in a away that you can leverage effects of processor caches, e.g. because it does not fit in the cache of a single core, your problem can scale better than linear.

从理论角度来看,你可以达到的最大值是线性加速。在实践中,有可能超线性加速。如果您可以在远离地分发您的问题,您可以利用处理器缓存的影响,例如因为它不适合单个内核的缓存,所以您的问题可以比线性更好地扩展。

#2


In theory, no - but in practice this might be the case (depending on the underlying hardware and your specific problem). Its not trivial to compare parallel and sequential code (you have to compare the fastest sequential implementation with your parallel implementation, not just your parallel implementation running on a single processor/thread).

理论上,没有 - 但在实践中可能就是这种情况(取决于底层硬件和您的具体问题)。比较并行和顺序代码并不简单(您必须将最快的顺序实现与并行实现进行比较,而不仅仅是在单个处理器/线程上运行的并行实现)。

But still, when someone speaks about more-than-linear speed-up I would always be suspicious; they either didn't measure it correctly (see above), measured an artifact (hardware/OS dependent) and should document it accordingly, or this only works for a specific combination of problem/implementation/hardware.

但是,当有人说出超过线性的加速时,我总是会怀疑;他们要么没有正确测量它(参见上文),测量工件(硬件/操作系统相关)并应相应地记录它,或者这仅适用于问题/实现/硬件的特定组合。