Reorder the memory reads.
Drag or swap the memory address blocks below to break — or fix — cache speed.
Drag or swap the memory address blocks below to break — or fix — cache speed.
Drag or click any two memory reads to reorder them
Grouping matching addresses together (e.g. 0 next to 1, 32 next to 33) lets them reuse the same loaded cache line.
Memory access order (same 8-line modeled cache, 64 reads)
Cost model: 1 cyc hit · 51 cyc RAM miss (simulated, not CPU measurements)Cache geometry (8 lines total)
97 → Row #0 (Tag 3)EVICTION MISS (kicked out Tag 2)Address 97 maps to Row #0, which was already full. The cache had to evict Tag 2 and wait 50 cycles for RAM.
Cache hit rate
0.0%
Higher = faster CPU
Modeled read time
51.0 cyc
Worst-case baseline
Fast hits / Slow misses
0 / 64
Avoidable evictions
60 (+4 first loads)
Every single read missed! Because addresses 0, 32, 64, and 96 all hash to Row 0, each read kicks out the previous one. Try clicking 'In order (0, 1, 2…)' above to fix the access order — or switch to '4-way' so 4 blocks can share the same row.
Software order vs. wider hardware
Changing how code traverses memory (Jump by 32 → In order) recovers 75% hits and a 3.8× modeled speedup without adding multi-way tag comparators in silicon.
Browser port of a trace-driven C coursework simulator (8 lines, 4 words/block, modeled 1/51-cycle AMAT — not hardware benchmark timings).