3 ms·
If you are interested in learning more about python and caching I wrote a post about it couple days ago: http://russell.ballestrini.net/explaining-cache-with-p
by foxhop 14y ago
If you are interested in learning more about python and caching I wrote a post about it couple days ago:
http://russell.ballestrini.net/explaining-cache-with-python/ http://russell.ballestrini.net/explaining-cache-with-python/
- AncientPC 14y agoThat's more accurately described as memoization, as caching is a broader term. Also, you might want to look into Sieve of Eratosthenes, as you only have to test up to sqrt(n) for primality: https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
- foxhop 14y agoThank you, AncientPC. I have adjusted the article with the insight you and many others have provided me.