Performance Analysis
How is speedup, which expresses a performance improvement, calculated?
- AExecution time before ÷ execution time after
- BExecution time after ÷ execution time before
- 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.