intermediate · memory

What Is a Cache Line?

What is a cache line, and why should an application engineer care about one?

Practical scenario

A code review proposes padding a hot counter struct to 64 bytes. A reviewer asks what a cache line is and why the padding is worth the memory.

What it tests

  • Knowledge that memory moves in blocks rather than variables
  • Whether the candidate connects the line to concrete software consequences
  • Understanding that the line is also the unit of coherence

Lessons behind this question