
#28: Making Python Fast: Profiling Python Code
Talk Python To Me
00:00
Code Ship: How to Create a Python Dictionary That Caches Out Function Arguments
A decorator can only call a function if it's never seen the inputs before. It adds an internal cache, which is just a Python dictionary that keeps the function arguments as the key and the output of the function as the value. So what all it needs to do is a simple dictionary call. And for the amount of words in the English language that are primarily used, it'll be called much less.
Play episode from 33:46
Transcript


