Message from JavaScript talks

May 2017

— I would make it a flat array like a regular string map, available via String(), but also tack on a seperate map implementation which maps sections of that array

Message permanent page

— 

I think that is better than trying to let the data structure itself define sections, at least when you use a linked list like that

— Then, on set, you would lookup existing characters, then add only missing characters but to the end of the array

Message permanent page

— To represent something, maybe some map like this:
[0,1,2,56,78]

— But integers are also pass-by-value, so that defeats the purpose of trying to be more memory efficient, but you get the idea

Message permanent page

— So maybe instead, a Bloom filter would work better, since you are re-using the same hash for multiple objects

Message permanent page

— It is a simple bit array

— "While risking false positives, Bloom filters have a strong space advantage over other data structures for representing sets, such as self-balancing binary search trees, tries, hash tables, or simple arrays or linked lists of the entries."

Message permanent page

— Hmm

— Since there can only be 26 letters and 10 numbers represented, I think it should work perfectly

— "However, if the number of potential values is small and many of them can be in the set, the Bloom filter is easily surpassed by the deterministic bit array"

Message permanent page

— It does a single loop str.length times for every addition and lookup