Memoization in the context of Hash table


Memoization in the context of Hash table

Memoization Study page number 1 of 1

Play TriviaQuestions Online!

or

Skip to study material about Memoization in the context of "Hash table"


⭐ Core Definition: Memoization

In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs. It works by storing the results of expensive calls to pure functions, so that these results can be returned quickly should the same inputs occur again. It is a type of caching, normally implemented using a hash table, and a typical example of a space–time tradeoff, where the runtime of a program is reduced by increasing its memory usage. Memoization can be implemented in any programming language, though some languages have built-in support that make it easy for the programmer to memoize a function, and others memoize certain functions by default.

Memoization has also been used in other contexts (and for purposes other than speed gains), such as in simple mutually recursive descent parsing. In the context of some logic programming languages, memoization is also known as tabling.

↓ Menu
HINT:

In this Dossier

Memoization in the context of Immutable object

In object-oriented (OO) and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created. In some cases, an object is considered immutable even if some internally used attributes change, but the object's state appears unchanging from an external point of view. For example, an object that uses memoization to cache the results of expensive computations could still be considered an immutable object.

Strings and other concrete objects are typically expressed as immutable objects to improve readability and runtime efficiency in object-oriented programming. Immutable objects are also useful because they are inherently thread-safe. Other benefits are that they are simpler to understand and reason about and offer higher security than mutable objects.

View the full Wikipedia page for Immutable object
↑ Return to Menu