Modern computers are ridiculously fast. V8 JIT compiler can produce pretty fast native code for hot paths.
Thus all together allows JS perform surprisingly well in the vanilla case, even using simple algorithms. I wonder how much faster could one make the lookup by e.g. using a typed array to represent the trie and the index; that would be cache-friendly.