CPU Performance
What makes one CPU faster than another?
Contents
What Affects CPU Performance?
Why does one laptop cost £400 and another £1400? Often, it comes down to the CPU. There are three main factors that affect how fast a CPU can process instructions:
Clock Speed
How many cycles per second
3.5 GHz
Cache Size
Fast memory on the CPU
8 MB
Number of Cores
Parallel processing units
4 cores
1. Clock Speed
What is Clock Speed?
Clock speed is the number of cycles the CPU can perform per second. It's like the heartbeat of the CPU - every 'tick' of the clock allows the CPU to perform operations.
- 1 Hz = 1 cycle per second
- 1 MHz = 1 million cycles per second
- 1 GHz = 1 billion cycles per second
Modern CPUs typically run at 2-5 GHz.
Analogy: The Drummer in a Band
Think of clock speed like a drummer in a band. The drummer sets the pace for everyone else. A faster drum beat (higher clock speed) means the band can play faster.
But there's a limit - if the drummer plays too fast, the other musicians can't keep up, and things start to go wrong!
How Does Clock Speed Affect Performance?
Advantages of Higher Clock Speed
- More instructions processed per second
- Programs run faster
- Better responsiveness
Disadvantages of Higher Clock Speed
- Generates more heat
- Uses more electrical power
- Physical limits on maximum speed
2. Cache Size
What is Cache?
Cache is small, super-fast memory built directly into the CPU. It stores copies of data that the CPU uses frequently, so it doesn't have to fetch from the slower RAM every time.
- L1 Cache: Smallest (32-64KB), fastest, closest to CPU cores
- L2 Cache: Medium (256KB-1MB), slightly slower
- L3 Cache: Largest (4-32MB), shared between all cores
Analogy: Your Desk, Bookshelf, and Library
Imagine you're writing an essay:
- Your desk (Cache) - holds the books you're using right now = instant access
- Bookshelf (RAM) - across the room = takes a few seconds to fetch
- Library (Hard Drive) - across town = takes ages!
A bigger desk means more books within reach = less time wasted walking!
Speed Comparison
| Memory Type | Access Time | Speed |
|---|---|---|
| L1 Cache | ~4 clock cycles | Fastest |
| L2 Cache | ~10 clock cycles | Very Fast |
| L3 Cache | ~40 clock cycles | Fast |
| RAM | ~100+ clock cycles | Slower |
How Does Cache Size Affect Performance?
Advantages of Larger Cache
- Reduces time waiting for data from RAM
- More "cache hits" (data found in cache)
- Keeps frequently used data close to CPU
Disadvantages of Larger Cache
- Very expensive per megabyte
- Takes up space on the CPU chip
- More cache = higher cost
3. Number of Cores
What is a Core?
A core is like a complete mini-CPU that can execute instructions independently. Modern CPUs have multiple cores, allowing them to run multiple tasks at the same time (in parallel).
2 cores
4 cores
8 cores
Analogy: Supermarket Checkouts
Think of cores like checkout tills in a supermarket:
- 1 core = 1 checkout - customers queue up, served one at a time
- 4 cores = 4 checkouts - 4 customers served simultaneously
- 8 cores = 8 checkouts - even more customers served at once
BUT: If there's only one customer, having 8 checkouts doesn't help! Similarly, if software only uses 1 core, extra cores won't speed it up.
How Does Number of Cores Affect Performance?
Advantages of More Cores
- Can run multiple programs simultaneously
- Multi-threaded programs run faster
- Better at multitasking
Disadvantages/Limitations
- Not all software can use multiple cores
- Some tasks can't be split into parallel parts
- More cores don't help single-threaded apps
- Benefits greatly: Video editing, 3D rendering, scientific simulations
- Limited benefit: Simple programs, older software, web browsing
4. Combined Effects
In reality, all three factors work together. The "best" CPU depends on what it will be used for.
Which Factors Matter Most?
🎮 Gaming
Many games prefer fast single-thread performance but can use 4-8 cores.
🎬 Video Editing
Video encoding is highly parallelisable - more cores = faster rendering.
💼 Office Work / Web Browsing
Light tasks don't need extreme performance.
🔬 Scientific Computing
Complex calculations benefit from parallel processing.
Trade-offs to Remember
- Higher clock speed often means fewer cores (due to heat)
- More cores often means lower per-core clock speed
- Larger cache increases cost significantly
- The best balance depends on the use case
5. Summary & Exam Checklist
What You Need to Know
- ☐ Higher clock speed = more cycles per second
- ☐ Measured in GHz (gigahertz)
- ☐ Increasing it generates more heat and uses more power
- ☐ Larger cache = more data stored close to CPU
- ☐ Cache is much faster than RAM
- ☐ L1 is fastest but smallest; L3 is largest but slowest
- ☐ Cache hit = fast; Cache miss = must fetch from RAM
- ☐ More cores = can process multiple instructions simultaneously
- ☐ Software must be multi-threaded to benefit
- ☐ Good for multitasking and parallel processing
- ☐ Doubling cores does NOT double performance for all tasks
- ☐ All three factors work together
- ☐ The "best" balance depends on the use case
- ☐ There are trade-offs between factors
| Factor | Effect of Increasing | Limitation |
|---|---|---|
| Clock Speed | More instructions per second | More heat, more power |
| Cache Size | Fewer slow RAM accesses | Expensive, limited space |
| Number of Cores | More parallel processing | Only helps multi-threaded software |