DSA DSA In Depth
0%
Free & open source

Data structures &
algorithms, in depth.

Read it, watch it, run it, build it.

Start learning →
180
Topics
69
Simulators
22
Builds
158
Videos
720
Questions

Try it live

CPU 64-Byte Cache Line & Stride Locality Simulator
64B Cache Line (8 × 8B)

Compare contiguous stride-1 traversal (1 cache miss per 8 elements, ~4 cycles L1 hit) against stride-8 and heap pointer-chasing (100% cache misses, ~200 cycles RAM stall).

Step 1 / 12

Invariant & State

Access index [0] (Cache Line #0): Cold Cache Line Miss (+DRAM stall)
Cache Line #0 (64 Bytes = 8 × int64) — RESIDENT IN L1 CACHE
0x1000 12 MISS (DRAM)
0x1008 45 In L1
0x1010 78 In L1
0x1018 23 In L1
0x1020 56 In L1
0x1028 89 In L1
0x1030 34 In L1
0x1038 67 In L1
Cache Line #1 (64 Bytes = 8 × int64) — NOT IN L1
0x1040 91 Cold
0x1048 14 Cold
0x1050 29 Cold
0x1058 63 Cold
0x1060 82 Cold
0x1068 37 Cold
0x1070 50 Cold
0x1078 74 Cold
Accesses
1 / 12
L1 Cache Hits
0
Cache Misses
1
Cumulative Cycles
60 cy (~60.0 cy/op)
Read A[0] = 12 at 0x1000 -> CACHE LINE FILL (fetched 64B block)
Open lesson →

In every lesson

Intuition first
Hand-picked videos
Diagrams & notes
Audio narration
Check yourself
Code you can run

22 from-scratch builds

Curriculum

Foundations, Memory Hierarchy & Linear Structures

Hashing, Sorting & Divide-and-Conquer

Trees, Balanced Hierarchies & Range Queries

Strings, Automata & Information Retrieval

Graph Theory, Shortest Paths & Network Flow

Dynamic Programming, Combinatorial Search & Advanced Paradigms

Start with the first lesson.

Start learning →