IT lexicon › Hardware › Cache line

Cache line

Hardware På svenska → Updated: 2026-05-24

The smallest unit the CPU loads into cache from RAM — typically 64 bytes on x86, 128 on some POWER. Reading 1 byte = loading the whole line.

Big performance impact. Cache-friendly = struct fields used together sit in the same line. False sharing = two threads mutating different variables that happen to share a line → cache invalidation storm. Padding/alignment trick: insert padding bytes so shared variables land in their own lines. Performance Engineering 101.

← Back to the lexicon