Re:Deep JavaScript: Theory and Techniques
by game_the0ry on Wednesday June 17, 2020 @06:03PM
(#23557317)
> 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?
It'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.
Re:Deep JavaScript: Theory and Techniques
by game_the0ry on Tuesday June 23, 2020 @04:39PM
(#23619920)
Not sure what you're getting at. Could you elaborate?
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.