September 10, 2001 | Quantitative Analysis of Memoization | Slide #4 |
Suppose we make some calls to m
We find that 37% of the time, the desired value is already in the cache
The other 63% of the time, the real f must be called
We have a cache hit rate of 0.37
Hit rate is always between 0 and 1
1: A cached value is available every time; f is never called
0: The cached value is never there
Next | Copyright © 2001 M-J. Dominus |