Skip to content

Cache Timing

Average Access Time

\[Average Mem Access Time = t_{hit} + r_{miss} * penalty_{miss} \]

Improve Hit Time

  • The smaller the cache, the better the hit time.
  • The lower the associativity, the better the hit time.

However, these will greatly increase the miss rate.

Reduce Miss Rate

  • The larger the block size, the lower the miss rate. Having a very big block makes movement of data too expensive to be worth though. Leads to unnecessary data movement during miss.
    • The block size is determined more so by the data access pattern than optimising for the miss rate.
  • Increasing cache size to X2 reduces miss rate by root 2 (empirical rule)
  • Direct-mapped cache of size N has same miss rate as 2-way associative cache of size N/2