Message from JavaScript discussions

May 2017

— That doesn't sound good, haha

— 

I imagine for every wrong guess the traversal makes it will increase the time complexity by a factor slightly smaller than a linear lookup

— If it follows a linear path, it will wind up going back on itself multiple times, revisiting nodes

— Whereas a regular linear lookup never does, due to storing everything discretely

— I'll implement both, then compare runtimes, as well as compare to the native set

— I think it should be structured differently, seperate representation from the real dataset

— 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

Message permanent page

— 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