# Amdahl's Law

The main idea is that when we speed up a part of a system, the effect of the overall system performance depends both on how significant this part was and how much it speed up.

Considering:

- T
_{old}is the time required to execute an application *p*is the proportion of execution time that the part benefiting from the performance originally occupied*s*is the factor in which part*p*was improved

That is, a part of the system originally required time $pT_{old}$ and now requires: $$\frac{pT_{old}}{s}$$ And the new overall time is: $$T_{new}=(1 - p)T_{old} + \frac{pT_old}{s} = T_{old}[(1 -p) + \frac{p}{s}]$$

Given the speedup is: $$S = \frac{T_{old}}{T_{new}}$$ We can write it as: $$S = \frac{1}{(1 -p) + \frac{p}{s}}$$

## Example

Consider we are able to improve a part of the system that initially consumed 50% ($p = 0.5$) of the time by a factor of 5 ($s = 5$). Then the overall speedup of the system is: $$S = \frac{1}{(1-0.5) + \frac{0.5}{5}} = 1.66$$