Quidest?

Memoization

· Lorenzo Drumond

Memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls to pure functions and returning the cached result when the same inputs occur again. Memoization has also been used in other contexts (and for purposes other than speed gains), such as in simple mutually recursive descent parsing. It is a type of caching.

At its core, memoization is just caching (storing a copy of) the result of a computation so that we don’t have to compute it again in the future.

References

Next -> referential-transparency

#optimization #algorithm #cache #programming #optimal #expensive #dynamic #function #memoization #store #speed #efficient