COD Chapter 4 — Performance
Execution time, CPI, the MIPS pitfall, and Amdahl’s Law.
Sections
📐
Formula Toolkit
Every formula to memorize — clock, CPI, MIPS, Amdahl.
💡
Concepts
Short theory for the written question.
✍️
Worked Examples
11 slide examples, fully solved. Hide & self-test.
🎯
Practice Quiz
Exam-pattern problems with reveal-able solutions.
🧮
Live Calculators
CPU-time, average-CPI & Amdahl tools.
Quick summary
TIME is king. Smaller time wins. "n× faster" = Time_slow / Time_fast.
MASTER: CPU time = IC × CPI × T = (IC × CPI) / clock rate
Total cycles = IC × CPI
T = 1/F , F = 1/clock rate (GHz → divide, ps/ns → multiply)
AVG CPI: counts → Σ(CPIi·Ci) / ΣCi
percentages → Σ(fraction · CPI)
COMPARE: same ISA → IC cancels
same machine → T cancels, compare total cycles
MIPS = IC / (time × 10⁶). TRAP: high MIPS can be SLOWER. Trust time.
AMDAHL: New time = Unaffected + Affected / r ; Speedup = Old / New
Max speedup = Old / Unaffected. Target < Unaffected ⇒ IMPOSSIBLE.
UNITS: ps=10⁻¹² ns=10⁻⁹ µs=10⁻⁶ ms=10⁻³ MHz=10⁶ GHz=10⁹