In computer performance optimization, a commonly used formula called Amdahl's Law describes how a system's overall speedup is constrained by the portion that takes up a large share of the runtime. The formula is:
Where:
- ( P ) is the fraction of the program that can be parallelized (as a share of total runtime).
- ( S ) is the speedup of that parallelized portion (for example, the speedup achieved by running it on a multi-core processor).
Explanation
- The larger ( P ) is (that is, the more the main time-consuming portion can be optimized), the more significant the overall performance gain.
- If a portion of the runtime cannot be optimized (that is, ( P ) is small), then no matter how well the other portions are optimized, the overall speedup will still be limited.
The core idea of this formula is: system performance gains are limited by the portion that consumes runtime.