Skip to content
BetterDL

CPU performance

Also called: performance, processor performance, speedup

How fast a CPU runs programs, measured as the inverse of execution time: instructions × CPI × clock period.

Performance means getting a program done in less time. The usual measure is just the inverse of cpu execution time:

performance = 1 / time, where time = instructions × CPI × clock period

To compare two designs, compute the time for each on the same program. The speedup of B over A is time(A) ÷ time(B).

The equation shows the three levers, and why no single number tells the whole story:

  • Instruction count: depends on the program, the compiler and the instruction set.
  • CPI: depends on how the hardware carries out each instruction. Single-cycle designs have CPI = 1; multi-cycle designs more.
  • Clock period: depends on the circuits and on how much work each cycle does. Pipelining shortens it.

A faster clock with a much higher CPI can lose. Fewer, more complex instructions can lose if each takes many more cycles. Always multiply all three.

Worked example

Example

Speedup from a change

A program runs 5 × 10⁸ instructions at CPI 2.5 on a 1 GHz clock. A redesign cuts CPI to 2.0 but slows the clock to 900 MHz.

  1. 1.

    Before: 5 × 10⁸ × 2.5 × 1 ns = 12.5 × 10⁸ ns = 1.25 s.

  2. 2.

    After: 5 × 10⁸ × 2.0 ÷ (0.9 × 10⁹ Hz) ≈ 1.11 s.

  3. 3.

    Speedup = 1.25 ÷ 1.11 ≈ 1.125. The redesign is about 12.5 % faster.

Common mistakes

  • Comparing CPUs by clock frequency alone.

  • Computing speedup upside down. It's old time ÷ new time, so a faster design gives a number above 1.

Practice CPU performance

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

CPU performance is taught in Basic CPU / Computer Architecture.