Performance Analysis

When combining ratios of speed against a reference machine across several benchmarks, why is the geometric mean often used?

  1. AThe geometric mean is always larger than the arithmetic mean
  2. BThe geometric mean has the same meaning as total time
  3. CThe relative ranking and ratio between two machines do not change regardless of which machine is chosen as the reference
Show answer and explanation

Answer: C. The relative ranking and ratio between two machines do not change regardless of which machine is chosen as the reference

Averaging speed ratios arithmetically can flip the conclusion about which of two machines is faster depending on the reference chosen. With the geometric mean, the ratio between two machines does not depend on the reference, enabling fair comparison. However, the geometric mean does not represent the total time to run all programs, so for some purposes comparing summed times is more appropriate.

  • A. The geometric mean is at most the arithmetic mean.
  • B. It has a different meaning from total time.
  • C. Correct. This property suits averaging ratios.
Practice this topic Back to topic

More Performance Analysis questions

  1. Two programs with equal instruction counts run back to back, one at 1000 million instructions per second and the other at 500 million. What is the overall average rate?
  2. Timing a small loop like the one above gave nearly zero time even for large N. What is the most likely cause?
  3. When timing a program, why are measurements often repeated with the first few runs discarded?
  4. What is the problem with timing a very short operation once, and what is the fix?
  5. What is the difference between wall-clock time and CPU time?