Performance Analysis
Two programs with equal instruction counts run back to back, one at 1000 MIPS (1 billion instructions per second) and the other at 500 MIPS. What is the overall average rate?
- A750 MIPS
- BAbout 707 MIPS
- CAbout 667 MIPS
Show answer and explanation
Answer: C. About 667 MIPS
With I instructions each, the times are and , totaling . Executing 2I instructions in that time gives an average rate ofMIPS. The slower program takes longer, pulling the average toward the slower rate. When averaging rates over equal amounts of work, use the harmonic mean, not the arithmetic mean.
- A. Simply averaging the rates arithmetically is wrong.
- B. That is the geometric mean, which does not represent the overall rate.
- C. Correct. Rates are averaged with the harmonic mean.