CPU cache miss
When the processor looks for data in the cache and it isn't there, so it has to bring it from RAM, which is slower. The percentage of times it is there is called the hit rate.
Example
If 950 of 1,000 reads are in the cache, there were 50 misses and the hit rate is 95%.
Test yourself: CPU cache miss
Memory and cache
If 180 of 200 reads are found in the cache, the hit rate is ___%.
180 / 200 = 0.9: 90%. The other 20 were misses that had to go to RAM.
Memory and cache
Which structure has more cache hits when walked?
Walking 1 million integers in an array, 15 out of 16 reads are hits. In a list, each node may sit on another line: many more misses.
0/2
â–¶ Play