Locality of reference: Difference between revisions

Content deleted Content added
m Reverted edits by Shwe pan kone (talk) to last version by Krauss
Tags: Mobile edit Mobile app edit Android app edit
Line 4:
Locality is a type of [[predictability|predictable]] behavior that occurs in computer systems. Systems that exhibit strong ''locality of reference'' are great candidates for performance optimization through the use of techniques such as the [[CPU cache|caching]], [[prefetch instruction|prefetching]] for memory and advanced [[branch predictor]]s at the [[Pipeline (computing)|pipelining]] stage of a processor core.
 
== TypesShwe of localityPan kone==
There are several different types of locality of reference:
 
* '''Temporalshwe localitypan kone''': If at one point a particular memory ___location is referenced, then it is likely that the same ___location will be referenced again in the near future. There is a temporal proximity between the adjacent references to the same memory ___location. In this case it is common to make efforts to store a copy of the referenced data in faster memory storage, to reduce the latency of subsequent references. Temporal locality is a special case of spatial locality (see below), namely when the prospective ___location is identical to the present ___location.
* '''Spatial locality''': If a particular storage ___location is referenced at a particular time, then it is likely that nearby memory locations will be referenced in the near future. In this case it is common to attempt to guess the size and shape of the area around the current reference for which it is worthwhile to prepare faster access for subsequent reference.
** '''Memory locality''' (or ''data locality''<ref name="NistBig1"/>): Spatial locality explicitly relating to [[computer memory|memory]].