---
title: "Discussion on \"What is Memoization?\" | Hashnode"
description: "Discussion on \"What is Memoization?\". An introduction to Memoization and how to use it"
url: "https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is Memoization?](https://blog.rupertmckay.com/what-is-memoization?utm_source=hashnode&utm_medium=feed)

An introduction to Memoization and how to use it

Feb 28, 2022 · 6 min read · blog.rupertmckay.com  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#computer-science](https://hashnode.com/tag/computer-science)
-   [#recursion](https://hashnode.com/tag/recursion)

## Written by

[Rupert McKay](https://hashnode.com/@fildon)

@fildon · Delft, The Netherlands

  
[View profile](https://hashnode.com/@fildon)

Staff Software Engineer at Lokalise

## Responses 3

Markdown supported · ⌘↵ to post

[Raghav Singh Gulia](https://hashnode.com/@raghavsinghgulia)

[Feb 28, 2022](https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a/comment/621cdbf2c07e2ceec785f391)

Awesome 🤯

[Aditya Mitra](https://hashnode.com/@aditya-mitra)

[Feb 28, 2022](https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a/comment/621cd81a085330c3f79c5ddb)

Great Article! Loved the 4 points for _what should not be memoized_

Just curious - JS `Map` orders the keys in manner of insertion. Does it actually give a `O(1)` lookup or `O(logn)`?

[Rupert McKay](https://hashnode.com/@fildon)

[Feb 28, 2022](https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a/comment/621cd81a085330c3f79c5ddb#reply-621cdce1085330c3f79c5f60)

The lookup time is still constant thanks to hash key lookup. The keys being ordered is a separate part of the same data structure.

[Raghuvir S. Gulia](https://hashnode.com/@raghuvir)

[Feb 28, 2022](https://hashnode.com/posts/what-is-memoization/621c78b145bf7fc41cc9fb0a/comment/621c7caf085330c3f79c4ea1)

Amazing 👏
