Speeding Up Function Calls with memoize
Apress eBooks · 2007
m emoize is an easy way to speed up function calls. It does this by caching the return value of the function for each set of arguments—a process called memoization . This can dramatically speed up the function, and it can be particularly helpful for calculations involving recursion. It’s also very useful for functions that are repetitive and involve reading data from a hard drive. For example, you could use this to speed up a photo gallery that retrieves EXIF data from JPEGs, or a media player that reads ID3 tags. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.