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 often shown relative to the same program run on one core. For a fair comparison, however, the baseline should be the time of the fastest serial (non-parallel) program.

  • 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.