Home / Definitions / Memoization

Memoization

Jenna Phipps
Last Updated May 24, 2021 8:02 am

Memoization in programming allows a programmer to record previously calculated functions, or methods, so that the same results can be reused for that function rather than repeating a complicated calculation. This means using the command or function memoize, which accesses the library of memos that have been previously recorded.

Memoization optimizes computing time, though it does take more resources accordingly. Memoizing functions or methods allow the program to avoid calculating complicated processes multiple times. A method in object-oriented programming, or the way an object behaves in its class, can then perform a process more quickly rather than taking time to recalculate an input. Inputs, which allow programmers to enter data quickly into a program rather than directly coding everything, are memoized to keep the exact same calculation in storage for next time.