Global Information Lookup Global Information

Hash consing information


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.[1] Hash consing has been shown to give dramatic performance improvements—both space and time—for symbolic and dynamic programming algorithms.[citation needed]

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.[2][3]

  1. ^ Liljenzin, Olle (2013). "Confluently Persistent Sets and Maps". arXiv:1301.3388 [cs.DS].
  2. ^ Allen, John (1978). Anatomy of Lisp. McGraw Hill. ISBN 0-07-001115-X.
  3. ^ Filliâtre, Jean-Christophe; Conchon, Sylvain (2006). "Type-Safe Modular Hash-Consing". Workshop on ML. ACM.

and 7 Related for: Hash consing information

Request time (Page generated in 0.7551 seconds.)

Hash consing

Last Update:

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...

Word Count : 530

Hashlife

Last Update:

technique of hash consing may avoid creating a duplicate node representing those contents. If this is applied consistently then it is sufficient to hash the four...

Word Count : 1558

Flyweight pattern

Last Update:

reuse. In other contexts, the idea of sharing data structures is called hash consing. The term was first coined, and the idea extensively explored, by Paul...

Word Count : 1630

Sharing

Last Update:

memory between different data items to save space, otherwise known as hash consing. Resource sharing—called kaláka in Hungarian—is an old tradition in Hungary...

Word Count : 998

Purely functional data structure

Last Update:

Random access list, implemented as a skew-binary random access list Hash consing Zipper (data structure) In his book Purely Functional Data Structures...

Word Count : 1392

Cons

Last Update:

language) CAR and CDR Constructor (computer science) Algebraic data type Hash consing "Efficient Interpretation by Transforming Data Types and Patterns to...

Word Count : 901

Eiichi Goto

Last Update:

had introduced the innovative technique of hash consing to eliminate redundant memory usage by using a hash table to map duplicated values to the same...

Word Count : 813

PDF Search Engine © AllGlobal.net