{"id":42668,"date":"2021-12-10T17:43:25","date_gmt":"2021-12-10T17:43:25","guid":{"rendered":"https:\/\/www.oracletutoring.ca\/blog\/?p=42668"},"modified":"2021-12-10T17:43:26","modified_gmt":"2021-12-10T17:43:26","slug":"computer-science-memoization","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/computer-science-memoization\/","title":{"rendered":"Computer science: memoization"},"content":{"rendered":"\n<h2>Tutoring computer science, terms arise. The tutor mentions memoization.<\/h2>\n<p>\nLet&#8217;s imagine a function called F1. Let&#8217;s further imagine that F1 uses a lot of resources &#8211; calls to it take a lot of computation power.<\/p>\n<p>In such a situation, you may want to store any result you get from calling  F1. That way, any subsequent time you need that same answer, it need only be looked up in a table rather than recalculated by F1. A computer scientist would refer to said table as a cache. Furthermore, the idea of storing results from F1 in a cache is called memoization.<\/p>\n<p>\nMemoization is commonly used: a simple example is that your browser keeps a cache where it stores image files, etc, that it&#8217;s loaded from webpages you&#8217;ve visited. Those files are easier to reload from the cache than from the online source, so when you return to that site, it loads more quickly.<\/p>\n<p>An obvious trade-off of memoization is that it occupies extra memory. However, memory is cheap nowadays, whereas processing demands continue to increase. Hence, memoization is likely to increase.<\/p>\n<p>Source:<\/p>\n<p><a href=\"https:\/\/codeburst.io\/understanding-memoization-in-3-minutes-2e58daf33a19\">codeburst.io<\/a><\/p>\nJack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.\n","protected":false},"excerpt":{"rendered":"<p>Tutoring computer science, terms arise. The tutor mentions memoization. Let&#8217;s imagine a function called F1. Let&#8217;s further imagine that F1 uses a lot of resources &#8211; calls to it take a lot of computation power. In such a situation, you &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/computer-science-memoization\/\"> <span class=\"screen-reader-text\">Computer science: memoization<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[],"class_list":["post-42668","post","type-post","status-publish","format-standard","hentry","category-computer-science"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/42668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=42668"}],"version-history":[{"count":4,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/42668\/revisions"}],"predecessor-version":[{"id":42672,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/42668\/revisions\/42672"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=42668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=42668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=42668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}