3 ms·
Almost certainly. It's just called `functools.cache` now. It's also known as memoisation and a classic use of higher-level functions (aka decorators).
by globular-toast 3y ago
Almost certainly. It's just called `functools.cache` now. It's also known as memoisation and a classic use of higher-level functions (aka decorators).
- bobnamob 3y agoAnd memoisation is a common technique to shift performance (processing -> memory) tradeoffs when doing anything trivially recursive. I don't agree with TFA's take of "Nor does it make any sense to have caching at the function level?"