Speedup, Latency & Throughput

Final Q2(b) is always a 5-stage timing calculation. Learn these four formulas and the one worked example below and you own the whole question.

1. The formulas (memorize)

Let kk = number of stages, nn = number of instructions, tct_c = pipelined clock cycle time.
tc  (pipelined clock)=max(stage times)Single-cycle time / instr=(stage times)Non-pipelined total=n×(stage times)Pipelined total=(k+n1)×tc\begin{aligned} t_c \;(\text{pipelined clock}) &= \max(\text{stage times}) \\ \text{Single-cycle time / instr} &= \textstyle\sum(\text{stage times}) \\ \text{Non-pipelined total} &= n \times \textstyle\sum(\text{stage times}) \\ \text{Pipelined total} &= (k + n - 1)\times t_c \end{aligned}
QuantityNon-pipelinedPipelined
Total time (n instrs)ntin \sum t_i(k+n1)tc(k+n-1)\,t_c
Latency (1 instr)ti\sum t_ik×tck \times t_c
Throughput (steady)1/ti1 / \sum t_i1/tc1 / t_c
Speedupnon-pipelined totalpipelined total    k as n\dfrac{\text{non-pipelined total}}{\text{pipelined total}} \;\to\; k \text{ as } n \to \infty
Counter-intuitive but examined: pipelining makes a single instruction's latency worse (ktctik\,t_c \ge \sum t_i) because every stage now takes a full clock. It wins only on throughput.

2. Worked example — Autumn 2025 Q2(b)

5-stage pipeline (IF, ID, EX, MEM, WB); each stage 2 ns except MEM which is 3 ns; execute 2000 independent instructions with no hazards.

Q2bbig(i) total pipelined time · (ii) speedup vs single-cycle · (iii) single-instruction latency both ways · (iv) throughput both ways.

3. Live calculator

Edit the stage times or the instruction count — everything recomputes.

StageIFIDEXMEMWB
time (ns)
Pipelined clock tct_c = max stage = 3 ns · Single-cycle time/instr = Σ = 11 ns · k = 5
Non-pipelined total = 2000 × 11 = 22000 ns
Pipelined total = (5 + 2000 − 1) × 3 = 6012 ns
Speedup = 3.66× (ideal ceiling = k = 5)
Latency: non-pipelined 11 ns · pipelined 15 ns
Throughput: non-pipelined 90.91 · pipelined 333.33 (×10⁶ instr/s)
Section checklist
  • Pipelined clock = slowest stage; single-cycle time = sum of stages.
  • Pipelined total = (k + n − 1) · tc; speedup → k for large n.
  • Latency gets worse; throughput gets better — state both.