Search posts, tags, users, and pages
An introduction to Memoization and how to use it
Rupert McKay
@fildon · Delft, The Netherlands
Staff Software Engineer at Lokalise
Markdown supported · ⌘↵ to post
Raghav Singh Gulia
Awesome 🤯
Aditya Mitra
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)?
Map
O(1)
O(logn)
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
Amazing 👏
Raghav Singh Gulia
Awesome 🤯