Memoization
Noun · Development
Definitions
An optimization technique that caches the results of expensive function calls and returns the cached result when the same inputs occur again. Only works for pure functions (same inputs always produce same outputs). The foundation of dynamic programming and React's useMemo/React.memo.
In plain English: Remembering the answer to a calculation so you don't have to redo it when asked the same question again.
Example: "Memoize the Fibonacci function and it goes from exponential to linear time — each sub-problem is computed only once."