{
  "slug": "reuse-distance",
  "term": "Reuse distance",
  "aliases": [
    "LRU stack distance",
    "distinct-reference distance"
  ],
  "definition": "Reuse distance counts distinct identities accessed strictly between consecutive references to the same cache entry.",
  "note": "Immediate repetition has distance zero; a first appearance has no finite distance in a cold-start trace. Under equal-size, fully associative LRU with immediate demand admission, a reuse hits when its distance d is less than capacity C. Equality is a miss. [reuse-report]\n\nSome literature instead reports a one-based stack position s = d + 1, which hits when s <= C. Check the convention before comparing values or thresholds. [counter-stacks]\n\nIn 0,1,1,1,0 the final 0 has distance 1; in 0,1,2,3,0 it has distance 3. Both have three intervening requests, so request count alone does not give distinct-entry distance. [hesela]",
  "status": "research",
  "advantages": [],
  "limitations": [],
  "related": [
    "lru-replacement",
    "miss-ratio-curve",
    "cache-inclusion-property",
    "mapping-cache"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-19",
  "citations": [
    {
      "id": "reuse-report",
      "title": "Ding and Zhong. Reuse Distance Analysis. UR-CS-TR-741, February 2001, section 2.1 and Figures 1-3.",
      "url": "https://www.cs.rochester.edu/~cding/Documents/Publications/TR741.pdf",
      "accessed": "2026-10-19"
    },
    {
      "id": "counter-stacks",
      "title": "Wires et al. Characterizing Storage Workloads with Counter Stacks. OSDI 2014, sections 2 and 3.2.",
      "url": "https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-wires.pdf",
      "accessed": "2026-10-19"
    },
    {
      "id": "hesela",
      "title": "Hesela. LRU sizing from distinct-entry reuse distances; constructed examples.",
      "url": "https://hesela.com/analyses/ssd-mapping-cache-hmb/#reuse-distance",
      "accessed": "2026-10-19"
    }
  ]
}
