Live data from Hacker News

Speeding up function calls with lru_cache in Python

hackeregg.github.io

1–10 of 85 posts

Re: Speeding up function calls with lru_cache in Python

#5
Instead of the last quote in the article, I prefer this one (got it from [0])

>"There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors." – Martin Fowler

And there's plenty of similar articles, for example [1] [2]

[0] https://www.mediawiki.org/wiki/Naming_things

[1] https://dbader.org/blog/python-memoization

[2] https://mike.place/2016/memoization/

Re: Speeding up function calls with lru_cache in Python

#9
post #4

I recently discovered that joblib can do something similar, both on disk and in memory: https://joblib.readthedocs.io/en/latest/memory.html

This memoizes closures of functions, and lets them be executed on other processors? Does it support dependency tracking between memoized closures (incremental recomputation), or do I have to roll that, myself?
Post reply on HN