Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Permanent memoization is not your only option.

Caching the result of common inputs and discarding not-recently-used results can be useful on functions with huge - but nonuniformly distributed - input and output spaces. At the extreme, you might have procedural image or texture generation - perhaps the postprocessing of another image or texture, for example. Impurity is a great way to end up with serious cache invalidation bugs when untracked inputs are changed, and purity a great way to avoid them.



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

Search: