Memoization is a technique to cache function results in programming languages with certain functional features like JavaScript. It's known since the late 60s but you have to do a bunch of tricks to get memoization working in most of the popular languages in the last few decades. However, with the great popularity of languages like JavaScript or Python and with new features in the more "traditional" languages, memoization becomes available to a broad of computer programmers.
In this video I give an overview about writing a memoizer for a function that takes 1 argument. If you understand this basic principle, you can build even more powerful and versatile memoizers that can handle functions with one or more arguments. For an example, see this article on the Hexacta blog.
Keine Kommentare:
Kommentar veröffentlichen