Next | Making Programs Faster | 138 |
Memoization replaces a function f with a stub, m
m manages a cache
If the desired value of f is in the cache, it is returned
(Cache hit)
If not, f is called and the value is stored in the cache
(Cache miss)
It is a speed optimization - trades space for time
Next | Copyright © 2003 M. J. Dominus |