Skip to content
RED SAG Skills
hard20 pts · first answer countshash-mapjavascriptmemoization

Memo cache misses for equal arguments

A memoize helper uses JSON.stringify(args) as the cache key. f({ a: 1, b: 2 }) and f({ b: 2, a: 1 }) both compute from scratch. Why?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions