Popular recipes by Paul Moore http://code.activestate.com/recipes/users/98109/2001-10-16T12:23:26-07:00ActiveState Code RecipesMemoizing (cacheing) function return values (Python)
2001-10-16T12:23:26-07:00Paul Moorehttp://code.activestate.com/recipes/users/98109/http://code.activestate.com/recipes/52201-memoizing-cacheing-function-return-values/
<p style="color: grey">
Python
recipe 52201
by <a href="/recipes/users/98109/">Paul Moore</a>
.
Revision 2.
</p>
<p>For functions which are called often, particulary recursive functions or functions which are intensive to calculate, memoizing (cacheing) the return values can dramatically improve performance.</p>