第 150 / 187 篇

14.4. 测量并行程序的性能

说明

本文是个人学习用的非官方中英对照译文,原文:https://diveintosystems.org/book/C14-SharedMemory/performance.html。
原书采用 CC BY-NC-ND 4.0 许可(禁止演绎),请勿公开传播本译文。
标为「译注」「现代更新」的内容是译者补充,不代表原书作者观点;代码与原文逐字一致,未作改动。

14.4. Measuring the Performance of Parallel Programs

到目前为止,我们一直用 gettimeofday 函数来测量程序执行所用的时间。在本节中,我们讨论如何衡量一个并行程序相对于串行程序的表现,以及与测量并行程序性能相关的其他话题。

So far, we have used the gettimeofday function to measure the amount of time it takes for programs to execute. In this section, we discuss how to measure how well a parallel program performs in comparison to a serial program as well as other topics related to measuring the performance of parallel programs.

我们首先介绍与并行性能相关的一些基础知识:

We first cover some basics related to parallel performance:

尽管阿姆达尔定律和加速比是与性能相关的两个非常重要的概念,但对下面这些话题有良好的理解,能让读者对性能的理解更加全面:

While Amdahl’s Law and speedup are two very important concepts related to performance, having a good understanding of the following topics will round out a reader’s understanding of performance:

具体来说,古斯塔夫森-巴西斯定律让我们更好地理解阿姆达尔定律的局限。

Specifically, the Gustafson-Barsis Law gives a better understanding of the limits of Amdahl’s Law.