Message from JavaScript talks

June 2017

— I used the same test as you and also found that

— 

I think if I add index offsets that will complicate the data strcture and make it slower... to do so I'd have to store objects like this instead of raw strings:

{

    string: "Hello",

    offset: 24

}

— And that offset would not relect any real structure, just order of insertion to mimic a real linear structure

Message permanent page

— The real structure is this:

[

  65: [

      5: [

          "Asdfg"

      ]

  ]

]

— 65 being A in UTF-16, 5 being the string length

— So if you add a string, it could go anywhere

— Cool shit

— I think I can also add a precision argument to the constructor, to use more than the first letter if needed

Message permanent page

— For big sets of long strings, perhaps with high randomness, that would increase speed further

— Because with single character precision, you are limited to, most of the time, A-Z and 0-9, singly

— Which means if all your strings at least start with the same letters, with varying differences after, you would not see much if any speed boost over a normal array...

Message permanent page

— Good plan