Hash consing

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.

Source: Wikipedia — Hash consing (CC BY-SA 4.0)

Hash consing

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.

Source: Wikipedia "Hash consing" · CC BY-SA 4.0

Share this article: X · Bluesky
Privacy Policy