Hacker News new | past | comments | ask | show | jobs | submit login

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/




That'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


Thank you, AncientPC. I have adjusted the article with the insight you and many others have provided me.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: