fast-trie-js
trie
fast-trie-js | trie | |
---|---|---|
1 | 2 | |
3 | 94 | |
- | - | |
1.8 | 0.0 | |
almost 3 years ago | about 1 year ago | |
JavaScript | TypeScript | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fast-trie-js
-
Trie in JavaScript: The Data Structure Behind Autocomplete
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.j...
I used it for this little demo:
https://assets.opentoken.com/demos/search/index.html
trie
-
PruningRadixTrie – 1000x faster Radix trie for prefix search and auto-complete
If youre interested in a TypeScript fork of this that also supports deletion, see here: https://github.com/shortwave/trie
There are also a couple of bug fixes in there
-
Trie in JavaScript: The Data Structure Behind Autocomplete
Tries are fun structures!
However, for autocomplete you often want a weighted Trie because you have extra information you want to weight nodes by. An example with contacts is that you often want recent and frequent contacts.
My company has an open source trie implementation here for a client to do weighted contact auto complete: https://github.com/shortwave/trie
What are some alternatives?
common - Utilities and base libraries for use across polkadot-js for Polkadot and Substrate. Includes base libraries, crypto helpers and cross-environment helpers.
Typesense - Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences
Angular - Deliver web apps with confidence 🚀
zodios - typescript http client and server with zod validation
uFuzzy - A tiny, efficient fuzzy search that doesn't suck
pyroscope - Continuous Profiling Platform. Debug performance issues down to a single line of code [Moved to: https://github.com/grafana/pyroscope]