The main differences in L1 cache, L2 cache and L3 cache are size and speed.
L1 cache is the smallest and fastest, while L3 cach […]
Show full quote
The main differences in L1 cache, L2 cache and L3 cache are size and speed.
L1 cache is the smallest and fastest, while L3 cache is the biggest and slowest. L2 cache sits between them.
All three are types of caches used by a computer's CPU. They all exist to speed up the performance of the CPU by anticipating what data it needs.
When that data is stored in an L1 cache, L2 cache or L3 cache, the CPU can access and process it much quicker than it can if it pulls it from standard RAM.
The CPU looks for the data in order, which means it goes to the L1 cache first. This is where the data that the CPU is highly likely to need is stored.
It is very quick, and it is located very close to the CPU. As a result it is also small, so the amount of data that it can hold is limited.
If the CPU does not find the information that it needs in L1 cache, it checks the L2 cache. This is larger than L1 cache so it is slower, but its increased size means it is able to hold more data.
Finally, if the CPU cannot find what it is looking for in L2 cache, it moves to L3 cache, which is even larger .
Often these caches feed up the chain, so if a piece of data is needed regularly it will move out of L3 cache and up to L2 cache, or out of L2 cache and up to L1 cache.