Hacker News new | ask | show | jobs
by just2n 4962 days ago
I have quite a few questions about this implementation, but here are two bigger ones:

1. Why are constructed Maps here having delete, get, has, set, size, keys, values, and iterate added outside of the prototype? I guess I don't see why you wouldn't just put these on the prototype. That said, .call seems to be unnecessary in a lot of this code.

2. Why isn't there any attempt to make lookups for primitives faster. It's all O(n).