How “lru_cache” Can Make Your Functions Over 100X FASTER In Python



How “lru_cache” Can Make Your Functions Over 100X FASTER In Python

How “lru_cache” Can Make Your Functions Over 100X FASTER In Python

In this video we will be learning about how we can use lru_cache from functools to drastically increase the performance of our functions in Python. When used correctly this will lead to a MASSIVE performance boost.

lru_cache documentation:
https://docs.python.org/3/library/functools.html#functools.lru_cache

▶ Become job-ready with Python:
https://www.indently.io

▶ Follow me on Instagram:
https://www.instagram.com/indentlyreels

00:00 About lru_cache
00:42 How to use lru_cache
04:27 Cache information
05:50 Clearing the cache
06:24 More about lru_cache
07:29 Another example with lru_cache
09:58 Insane performance boost
10:20 More cache information
10:53 Documentation
11:14 Bye bye