March 2002 | Perl Hardware Store | 27 |
Memoizing is a really useful tool to have in your toolbox
Program too slow? Try sprinkling in a little memoization. It's cheap and easy.
Need to profile? Try memoizing. If it works, rewrite the function you memoized; if not, try another function.
Worried about recursion inefficiencies? Memoization is often a cheap and effective alternative to rewriting in iterative style.
Continued...
Next | Copyright © 2002 M-J. Dominus |