Amdahl's Law

Amdahl’s Law is a principle in computer architecture that defines the potential speedup in the execution of a task when only a certain proportion of the task can be parallelized. Formally,

where is the factor by which the parallelized part is sped up, and is the proportion of the total task runtime that can be parallelized.

Intuition

Consider the two parts of the denominator:

  • represents the proportion of the total task runtime that cannot be parallelized.
  • represents the proportion of total task runtime of when parallelized.
    Together, represent the proportion of time that the whole task when parallelized as a fraction of the not parallelized task time. As such, its inverse represents the speedup when compared to the original speed.

Therefore, in order to speed up your code, you must know which parts of your code make the program slower.

Properties

(Constraint)

As , , such that .

Examples

Example