Hardware Reference
In-Depth Information
Assume we have a computer where the cycles per instruction (CPI) is 1.0 when
all memory accesses hit in the cache. The only data accesses are loads and
stores, and these total 50% of the instructions. If the miss penalty is 25 clock
cycles and the miss rate is 2%, how much faster would the computer be if all
instructions were cache hits?
Answer
First compute the performance for the computer that always hits:
Now for the computer with the real cache, first we compute memory stall
cycles:
where the middle term (1 + 0.5) represents one instruction access and 0.5 data
accesses per instruction. The total performance is thus
The performance ratio is the inverse of the execution times:
The computer with no cache misses is 1.75 times faster.
Search WWH ::




Custom Search