How to use the Amdahl's Law Speedup Calculator
- 1. Pick what to findOverall speedup, the speedup a part needs, the fraction needed, or several parts at once.
- 2. Enter the numbersType the fraction of time that is improved and how much faster it gets (or the number of processors).
- 3. Read the workingSee the formula filled in, the upper limit, efficiency, Gustafson's speedup and a table for growing s.
Amdahl's law
If a fraction f of the running time can be made s times faster, the new time is (1 − f) + f ÷ s of the old time, so
Speedup = 1 ÷ ((1 − f) + f ÷ s).
As s grows, the speedup can never pass 1 ÷ (1 − f). If 5% of a program is serial, no number of processors gives more than 20×. For parallel programs, read s as the number of processors N. Gustafson's law assumes the problem grows with N, giving scaled speedup (1 − f) + f × N.
Worked example (Hennessy and Patterson)
A new unit is 10 times faster but can be used only 40% of the time: speedup = 1 ÷ (0.6 + 0.4 ÷ 10) = 1 ÷ 0.64 = 1.5625.
A program runs in 100 s and multiply takes 80 s of it. How much faster must multiply get for the program to run 4 times faster? 100 ÷ 4 = 25 = 80 ÷ n + 20, so n = 16. For 5 times faster you would need 20 = 80 ÷ n + 20, which no n can give: the other 20 s already use the whole budget.
Parallel case: f = 95%, N = 8 gives 1 ÷ (0.05 + 0.11875) = 5.93×, while the limit is 20×.
Frequently asked questions
What is the difference between Amdahl's and Gustafson's law?
Amdahl keeps the problem size fixed, so the serial part caps the speedup. Gustafson grows the problem with the number of processors, so the serial share shrinks.
Can the speedup be more than the number of processors?
Not under Amdahl's law. Real programs sometimes show it because of cache effects, but the formula does not model that.
How do I handle two separate enhancements?
Use the many parts mode. Speedup = 1 ÷ ((1 − f1 − f2) + f1 ÷ s1 + f2 ÷ s2), as long as the parts do not overlap.