Memory locality is the predictable tendency of a processor to access the same memory locations repeatedly over a short time (temporal locality) or to access memory addresses that are physically close together (spatial locality). This principle is the foundational rationale for caching, prefetching, and memory hierarchy designs, as it allows systems to anticipate needed data and reduce costly accesses to slower main memory. In agentic systems, exploiting locality in vector stores or knowledge graphs minimizes retrieval latency for sequential reasoning steps.
