5 ms·
I wrote a little Trie in Javascript for practice a while back. It flattens the data into a single array for better locality. I think it ends up being pretty qui
by mgraczyk 5y ago
I wrote a little Trie in Javascript for practice a while back. It flattens the data into a single array for better locality. I think it ends up being pretty quick for lookups (but not insertions).
https://github.com/mgraczyk/fast-trie-js/blob/master/index.js https://github.com/mgraczyk/fast-trie-js/blob/master/index.j...
I used it for this little demo:
https://assets.opentoken.com/demos/search/index.html https://assets.opentoken.com/demos/search/index.html