Message from JavaScript discussions
May 2017
— When the dataset gets diverse enough the first few checks will always pass, so this will gradually decrease in speed
So is it better than a linear lookup? We'll find out when it's working in a bit if you want to throw some tests at it
— Just send when you're ready
—
var mySet = new StringSet(function* () {
yield "Hello World";
yield "Morning Sunshine";
yield "Evening Gentlemen";
});
iterable support :D
— Ooops, that has to be initialized prior, haha
—
var mySet = new StringSet((function* () {
yield "Hello World";
yield "Morning Sunshine";
yield "Evening Gentlemen";
})());
— Should work
— Will it consume the entire iterable at once?
— Yeah it should
— And it should take arrays too
— An array is an iterable
— You can consume both with a for..of or something