SA
Skip to main content

Principles of Locality

Temporal Locality

  • If something is referenced, we have a high chance that it will be referenced again.
  • Loops, Function Calls, Setting Reusable Variables...
  • 90/10 Rule. 10% of the written instructions take 90% of the executed instructions.

Spacial Locality

  • If something is referenced, we have a high chance that items nearby will be referenced soon.
  • Arrays, Program Codes...