Performance Analysis
Which is the basic formula for a program's CPU execution time?
- AExecution time = instruction count + CPI + clock frequency
- BExecution time = clock frequency × instruction count
- CExecution time = instruction count × CPI (average cycles per instruction) × cycle time
Show answer and explanation
Answer: C. Execution time = instruction count × CPI (average cycles per instruction) × cycle time
Execution time is the product of the number of instructions executed, the average cycles per instruction (CPI) and the cycle time (clock period = 1 ÷ frequency). Instruction count is mainly set by the algorithm, compiler and ISA, CPI by the microarchitecture and cache misses, and cycle time by circuit and process technology. Improving performance means deciding which of the three to improve and by how much.
- A. It is a product, not a sum.
- B. Higher frequency shortens time, so it divides rather than multiplies.
- C. Correct. It is the product of three factors.