My python annoyances so far
John Nagle
nagle at animats.com
Thu Apr 26 23:21:38 EDT 2007
Alex Martelli wrote:
> Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> wrote:
> ...
>
>>detail you shouldn't care about. Functions that cache the result of long
>>time-consuming complications are _good_.
>
>
> Not necessarily --
> <http://blogs.msdn.com/oldnewthing/archive/2004/12/20/327369.aspx>
> asserts the exactly opposite principle, "Don't save anything you can
> recalculate"... of course, the best approach is generally a compromise,
> but it's good to be aware of the potentially high costs of caching:-).
>
>
> Alex
Abelson and Sussman has a better discussion of this subject.
Look under "memoization".
John Nagle
More information about the Python-list
mailing list