What is Memoization?

preview_player
Показать описание
You can speed up the efficiency of your functions in JavaScript through Memoization. This is the process of caching the results of your functions so the next time they run with the same parameters they will run much faster.
Not to be used on every function but they can be of benefit when you have processor intensive work to do.

Рекомендации по теме
Комментарии
Автор

I think you are one of the finest JavaScript teacher on YouTube. Crisped content, simple explanations, no unnecessary dragging of topic, no product placement in video. Thanks and keep going.

mandardeshpande
Автор

Is it only me that likes these vids before even watching them 😂? Thanks, in advance, prof! Let me now watch my video in peace 😂

maxtayebwa
Автор

I love your voice. So soothing. You content is amazing too.

ayushrawat
Автор

You renewed me
Now I understand what this concept is in react, finally
Thanks. Glad I discovered your channel

yinonelbaz
Автор

Thanks Steve. I did something like this about a year and a half ago in a time management and reporting system and it massively sped up things. Many times, the same reporting information showed up across various reports. Brought our cold report load time down to 7 seconds and our hot reload time to about 2. It was a minute and a half before.

OGBhyve
Автор

Hey Steve, thanks for the videos. Do you like vim editor ? What are your thoughts ? I've coded hundreds of lines of code in vimscript with only a handful of plugins and I still don't think I have gotten it where I need it at lol.

ironmanlifts
Автор

I guess the range of input values determines the size the memo variable could grow. Could that be a problem for functions running in a node server, per instance? They may be running for months or even years.

zerdnelemo
Автор

Doesn't the variable const memo get cleared out each time a copy of myFunc is created, due to block/function scope?

sachin.tandon
Автор

in this case once we run it again everything starts from again right I mean there's no property in memo object

romeojoseph
Автор

Very informative. So this is basically using closures to cache the results. I am wondering though, wouldn't this cause kind of a memory leak if the function is called with a lot of different values?

jeno
Автор

Please make a series of algorithms and data structure in js

prateekgoyal