AQA Computer Science GCSE
Computer Systems - CPU Performance
What makes a CPU perform better?
CPU Performance Summary - slides from class
CPU Performance - "textbook" notes on the factors
Comparing CPUs - screenshots to compare the machine I need to buy next...
The balance between the amount of main memory, caches and the clock speed and number of cores in a machine is one that needs to be carefully considered. And that's before other factors come into play - portability, operating system, software that will run on it, monitor size etc...
For example, increasing just the cache size won’t mean that the machine necessarily performs better - it depends on what the machine is being required to do and what other resources are available.
Small, ultra-portable laptop machines tend to have a lower technical specification because of the ways they are usually used. This might be absolutely fine - the tradeoff between portability and power is a sensible one to make at times.
Another obvious tradeoff is between cost and performance.
One of the three factors is cache size. Caches are memory areas closer to the CPU than main memory which provide temporary storage. They can be used to store data and instructions the CPU has used recently.
Caches are quicker areas of memory, often with a quicker bus. This means the data and instructions stored in them can be retrieved more quickly, improving performance. They're also closer to the CPU, further reducing the time it takes for data to be moved.
The bigger the cache, the more can be stored in it - but caches are expensive because they're quicker memory, so there needs to be a tradeoff.
The process works something like this:
- data or instruction used by CPU
- dump it on the top of the cache
- if the cache is full the data at the bottom of the cache falls out
Then the next time the CPU needs to retrieve data or instructions, it looks in the cache for it first. If it's in the cache, it retrieves it and after it's finished with it dumps it back on the top of the cache. This means that stuff that the CPU is using lots stays at the top of the cache and never falls out - so it's always quicker to retrieve it.