What is the difference between Caching and Memoization?

后端 未结 5 706
南方客
南方客 2021-01-30 15:17

I would like to know what the actual difference between caching and memoization is.
As I see it, both involve avoiding repeated function ca

5条回答
  •  梦如初夏
    2021-01-30 15:49

    I think term caching is usually used when you store results of IO operations, or basically any data that is coming to you from the outside (files, network, db queries). Term memoization usually applies to storing results of your own computations, for example in the context of dynamic programming.

提交回复
热议问题