Memoization¶
Caching function results indexed by their inputs converts repeated expensive computations into table lookups; assumes referential transparency (same inputs always produce same outputs)
Tension Addressed¶
Memory vs. Computation
Recognizable As¶
Function result caches, dynamic programming tables, computed property caching, request deduplication
Canonical Sources¶
Michie, "Memo Functions and Machine Learning" (1968); Cormen et al., "Introduction to Algorithms" - Dynamic Programming chapters
Transfers To¶
Dynamic programming, API response caching, build systems (incremental compilation)
Memoization requires that functions be pure (deterministic and side-effect free). Impure functions cannot be safely memoized because their results depend on state beyond their inputs.
Related Concepts¶
- Dynamic Programming - Algorithm Patterns