Spring 1999: Memoization

Caching is a straightforward way to speed up certain slow functions: You remember the return values by storing them in a cache, and if you are going to compute the same value again later, just get the result from the cache instead of recomputing it. It turns out it's not hard to build a facility that replaces any function with a caching version automatically; this is called memoization. This article explains how such a module works, and shows a number of interesting applications and contexts for memoization and caching.



Return to: Universe of Discourse main page | What's new page | Perl Paraphernalia


mjd-tpj-memoize@plover.com