Message from JavaScript discussions

May 2017

— Maybe instead there can just be a length method which sums the array lengths

— 

this.length = function () {
var sum = 0;
for (var set in list) {
for (var subset in character) {
sum += subset.length;
}
}
return sum;
};

— A friend of mine reccomended trying prime divisibility instead of uniques

— IE assign each character to a prime number, then test strings for divisibility somehow

— If divisibility fails, then the word has definitely not been added.

— That would be a lot faster than doing the linear search, I think

— Oooh shit, got it down to 126ms using indexOf instead of includes

— But it might be browser-specific https://jsperf.com/array-indexof-vs-includes

— Hmm

— Should be the same across V8 anyways

— I think we can go *faster* my dude

— If we replace the main list object with an array, and then from there convert to integer bytes, the arrays should run fast as hell compared to using strings

Message permanent page