Metraipolis › archive › dc_e6a5d71608d7

Hash consing — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Hash_consing
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-05T23:58:08.324Z
SHA-256 of the archived text
2cc8fb8c5a4a3fdd4a98b14688aca0027cafb34deaa7dace48ed075796ddfe40
Stable URL of this page
https://metraipolis.com/documento/dc_e6a5d71608d7

How to cite

Hash consing — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Hash_consing (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_e6a5d71608d7 (Metraipolis archive dc_e6a5d71608d7, sha256 2cc8fb8c5a4a3fdd4a98b14688aca0027cafb34deaa7dace48ed075796ddfe40)
BibTeX
@misc{dce6a5d71608d7,
  title = {Hash consing — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Hash_consing},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_e6a5d71608d7; sha256 2cc8fb8c5a4a3fdd4a98b14688aca0027cafb34deaa7dace48ed075796ddfe40},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Hash_consing. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

In computer science, particularly in functional programming, hash consing is a technique used to share values that are structurally equal. When a value is constructed, such as a cons cell, the technique checks if such a value has been constructed before, and if so reuses the previous value, avoiding a new memory allocation. A useful property of hash consing is that two structures can be tested for equality in constant time via pointer equality, which in turn can improve efficiency of divide and conquer algorithms when data sets contain overlapping blocks. Hash consing has been shown to give dramatic performance improvements—both space and time—for symbolic and dynamic programming algorithms. Hash consing is most commonly implemented with hash tables storing weak references that may be garbage-collected when the data stored therein contains no references from outside the table.

Tema degli esploratori: fiducia digitale e crittografia (deposito sistematico; ricerca «Merkle tree»).
Fonte: Wikipedia in inglese, voce «Hash consing» — https://en.wikipedia.org/wiki/Hash_consing
Wikidata Q3366087 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q3366087
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Hash_consing?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1314849526, consultata il 2026-10-05T23:24:51.192Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: 09070233af922ba94d29a6fde126517ef764ccfac6db3e624932e696e1fb27fb