4 ms·
We actually use this to insert 400M elements. The only reason the example inserts 4M elements was because Set and Object start to become prohibitively slow at
by jorangreef 6y ago
We actually use this to insert 400M elements.
The only reason the example inserts 4M elements was because Set and Object start to become prohibitively slow at some point and crash the process with too many allocations, not to mention the stress on the GC which now has to follow so many pointers.
HashTable performance is a fundamental component of any language.
- game_the0ry 6y ago> HashTable performance is a fundamental component of any language. Agreed, but why use Node if performance was so critical to your use case? Could this 400M insert logic exist in a separate service that lives outside your Node code base?
- _bxg1 6y agoIt's one thing to write a web service in a different language for performance; it's a much bigger question to move logic from your client to your server for the sake of performance. Both from a user experience standpoint and from an architectural complexity standpoint.
- game_the0ry 6y agoNot sure what you're getting at. Could you elaborate?
- deleted 6y ago[deleted]