Suppose we store long strings in a Map() object:
const m = new Map()
m.set(long_string_1, 10)
m.set(long_string_2, 20)
So, the question is what exactly is being stored inside Map:
- original long strings
- their hashed digests
- associated values (numbers 10 an 20 in the example)
In other words does the Map stores all 1st, 2nd and 3rd, or 2nd and 3rd only? My question is related to how much memory one entry would occupy in memory in such a case.
Thanks in advance.