Courses / Computer Science I
Introduction to Computers

Performance Trade-offs

Computer Science I 274 words Free to read

What Fast Really Means

Raw clock speed in GHz is the most quoted chip metric, but on its own it is a poor guide. Real performance depends on three factors multiplied together, captured by the CPU performance equation:

time=instructions×CPI×time per cycle\text{time} = \text{instructions} \times \text{CPI} \times \text{time per cycle}

Here, instructions is total count, CPI is cycles per instruction, and time per cycle is the inverse of clock speed. A slower clock with lower CPI or fewer total instructions often beats a higher-GHz rival.

FeatureBenefitCost / Trade-off
CacheSpeeds up memory accessCosts chip area and power
PipelineRaises instruction throughputComplicates control, risks stalls
CoresEnables parallel executionUseless for sequential tasks

Common Pitfall: Judging a processor purely by clock speed (the megahertz myth). Architecture and instruction count matter just as much.

Amdahl's Law and Limits

More cores help programs split into parallel work, but do nothing for tasks that are inherently sequential. This is formalized by Amdahl's law, which limits total speedup based on the non-parallelizable fraction.

Smax=1(1p)+pNS_{max} = \frac{1}{(1-p) + \frac{p}{N}}

In the formula, p is the parallel fraction and N is the number of processors. If 10 percent of a task is serial, 1 - p is 0.10. Even with infinite processors, the speedup can never exceed 10 times because the serial part dominates.

Key Distinction: Clock speed measures raw cycle rate, but performance measures actual work done over time. Similarly, cores add raw capacity, but Amdahl's law proves that sequential bottlenecks cap the gains.

Performance Trade-offs

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

11practice questions
2interactive scenes

Introduction to Computers