Performance Analysis

How is speedup, which expresses a performance improvement, calculated?

  1. AExecution time before ÷ execution time after
  2. BExecution time after ÷ execution time before
  3. CExecution time before − execution time after
Show answer and explanation

Answer: A. Execution time before ÷ execution time after

Speedup is the time before divided by the time after. A task that took 10 seconds and now takes 4 has a speedup of 10 ÷ 4 = 2.5×. "60% shorter" and "2.5× faster" describe the same change but are easily confused. For parallelization, speedup is shown relative to the single-core time as the core count grows.

  • A. Correct. A value of 2 means twice as fast.
  • B. That is the time ratio, which is below 1.
  • C. A difference is not a ratio.
Practice this topic Back to topic

More Performance Analysis questions

  1. A part taking 50% of total time is made 4× faster. What is the overall speedup (Amdahl's law)?
  2. You want to make an entire task 2× faster by speeding up only the part that takes 60% of the time. How many times faster must that part become?
  3. Which lesson about how to approach performance improvement follows best from Amdahl's law?
  4. What idea does Gustafson's law express?
  5. What is the difference between strong scaling and weak scaling in evaluating parallel computing?