Software Engineering ยท Performance
Caching a function's return value keyed by its input, so calling it again with the same input skips recomputation entirely.
Example: A function that remembers the answer it already calculated for a given input.
In practice: It only pays off for pure functions with repeated inputs โ memoizing a function with side effects or highly varied inputs can waste memory for no benefit.