mafintosh / unordered-set

A couple of functions that make it easy to maintain an unordered set as an array in an efficient way
MIT License
22 stars 2 forks source link

Jsperf compare to `new Set()` #1

Open jimmywarting opened 3 years ago

jimmywarting commented 3 years ago

using unordered-set mutates the object by setting a own property _index on the objects I guess this have some performances penalties?

I'm betting the native Set dose some some similar thing but use pointers instead? my bet is that new Set() is faster

jimmywarting commented 3 years ago

Hmm, it was a bit slower, wonder why