Speed up your python code by caching
Let's say you have a function that is a super-slow function. Not sure how you can find which is a super slow function? Measure it with this.
Now there is now way you can optimize the function, what you can do instead is that you can store results fro...
publications.theroyakash.com6 min read
Sébastien Portebois
Software architect at Ubisoft
Did you try timing it against the built-in cache functions Python provides?
eg docs.python.org/3/library/functools.html
It’s indeed a good way to introduce how to create custom decorators, but for this caching purpose, I’d believe the built-in implementation will be faster.