Contents    Page-10    Prev    Next    Page+10    Index   


Memoization (or memorization) is the technique of saving previously calculated values of an expensive function f(x). If a new request to compute f(x) uses a value x that was used previously, the value of f(x) can be retrieved from a table faster than it could be recomputed.


Advanced CPU's may implement some memoization in hardware: if the CPU can determine that a computation has already been done and exists in a register, it can reuse the result.