5 ms·
For JS, implement a Map data structure that is keyed by the value (not identity) of arbitrary objects.
by univerio 8y ago
For JS, implement a Map data structure that is keyed by the value (not identity) of arbitrary objects.
- xiphias2 8y agoAfter I implemented this and compared with just encoding the key with JSON, it turned out that JSON.stringify is so fast, that it's not really worth the effort.
- deleted 8y ago[deleted]