1.1.2

CPU performance

GCSE Computer Science 1.1.2: how clock speed, cache size and the number of cores affect CPU performance, individually and in combination.

About 10 minutes to read

The three characteristics

Figure: What each characteristic is, and how it affects performance

A useful way to hold these together: clock speed is how fast one worker works, cache size is how much material is kept within arm's reach, and cores are how many workers there are.

The limits of each

The specification asks for the effects of changing these characteristics individually or in combination, and the interesting part is that none of them improves performance without limit.

Clock speed. A faster clock means more cycles per second, but it also generates more heat. Beyond a certain point the CPU needs more cooling, and if it overheats it will throttle itself — deliberately slowing down — which undoes the benefit.

Cache size. A larger cache means fewer trips to RAM, which is a large gain because RAM is much slower than the CPU. But cache is expensive to manufacture and takes up space on the chip, and the benefit tails off: once the data being worked on fits in cache, making it bigger changes little.

Number of cores. More cores allow genuine parallel execution, but only if the software is written to use them. A program written to run as a single sequence of instructions will use one core no matter how many are available. Some tasks also cannot be split up, because each step depends on the result of the previous one.

Worked example

Two computers have the same clock speed and cache. One has four cores, the other has one. Explain why the four-core computer might not be four times faster.

  1. State what more cores allow: several instructions to be executed at the same time.
  2. Identify the condition: that only helps if there is more than one thing that can be done simultaneously.
  3. Software must be written to split work across cores; a single-threaded program uses one core and leaves the others idle.
  4. Some tasks cannot be split at all, because each step needs the result of the one before it.
  5. Conclude with the general point rather than the specific number.

Answer: Extra cores only help if the work can be divided between them. Software not written to use multiple cores runs on one, leaving the rest idle — and some tasks cannot be split because each step depends on the previous result. So four cores give up to four times the throughput, not automatically four times the speed.

Common mistake

Clock speed alone does not determine which CPU is faster. A CPU with a lower clock speed but more cores and a larger cache can outperform a higher-clocked one — which is why the specification asks about the three in combination.

Clock speed
the number of instruction cycles a CPU carries out each second, measured in hertz; a faster clock means more cycles but generates more heat
Cores
the separate processing units within a CPU, each able to execute instructions, so more cores allow more instructions at once
Cache size
the amount of very fast memory close to the CPU; a larger cache means the CPU waits less often for data from RAM

Before you practise

  • Clock speed is cycles per second, usually in GHz — higher means more instructions executed per second.
  • Cache is fast memory inside the CPU; more of it means less waiting for RAM.
  • Cores are separate processing units; more allow instructions to run at the same time.
  • A higher clock speed generates more heat, and an overheating CPU throttles itself.
  • A larger cache gives diminishing returns once the working data fits inside it.
  • Extra cores only help if the software can split the work across them.
  • Compare CPUs on all three characteristics together, not clock speed alone.

Now practise it

Reading is the easy half. Answer questions on 1.1.2 CPU performance and find out which parts you actually know.