Echo JS 0.11.0

<~>
mayank 2420 days ago. link 1 point
Hi folks, I posted this because of node's dismal performance in this simple benchmark. I'd love to hear your thoughts.

Replies

mscdex 2420 days ago. link 1 point
FWIW you can get better results using `Map()` in node. For example with node v8.3.0, using `Map` gives me 16.7 million items before the app crashes due to OOM.

Also for node, you should use the high-resolution timer (`process.hrtime()`) instead of `Date.now()` since the latter can be slow(er) due to calls to gettimeofday() IIRC.
Hylix 2419 days ago. link 1 point
Still kinda disappointing imho, how long did the test run before reaching this point? Is it also faster or kinda the same?

Also wouldn't a set be more appropriate in this case? Since the lookup time in a set would be faster than a map? Maybe a set also fits more ints?
mscdex 2419 days ago. link 1 point
I don't remember the times offhand.

The article was about using maps/hashes/key-value data structures, so a set wouldn't "work" in that case.