Performance Analysis

Which lesson about how to approach performance improvement follows best from Amdahl's law?

  1. APrioritize speeding up the parts that take most of the time (the common case)
  2. BSpeed up rarely executed parts first
  3. CSpeeding up any part has the same effect on the whole
Show answer and explanation

Answer: A. Prioritize speeding up the parts that take most of the time (the common case)

Making a part that uses 1% of the time infinitely fast speeds up the whole by only about 1%. Doubling the speed of a part that uses 80% yields about 1.7× overall. So the basic approach is to find where time is spent, for example with a profiler, and improve that first. "Make the common case fast" is a principle used again and again in computer design.

  • A. Correct. The effect depends on the share of time.
  • B. Speeding up a small share barely changes the whole.
  • C. The effect varies greatly with the share.
Practice this topic Back to topic

More Performance Analysis questions

  1. What idea does Gustafson's law express?
  2. What is the difference between strong scaling and weak scaling in evaluating parallel computing?
  3. What is the most appropriate approach when evaluating computer performance with benchmarks?
  4. Which describes a standard benchmark such as SPEC CPU?
  5. When combining ratios of speed against a reference machine across several benchmarks, why is the geometric mean often used?