Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aybabtme/trie
Fast trie implementations.
https://github.com/aybabtme/trie
Last synced: about 1 month ago
JSON representation
Fast trie implementations.
- Host: GitHub
- URL: https://github.com/aybabtme/trie
- Owner: aybabtme
- License: mit
- Created: 2014-06-12T00:13:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-24T17:41:09.000Z (over 10 years ago)
- Last Synced: 2024-06-20T22:33:41.143Z (5 months ago)
- Language: Go
- Homepage: http://godoc.org/github.com/aybabtme/trie
- Size: 3.23 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Trie
====Implements:
* A trie, use it like a `map[string]interface{}`.
* A ternary search tree, like a `map[string]interface{}` from which you cannot delete.
* A trieset, use it like a `map[string]struct{}`.Performance
===========This benchmarks shows lookups only (`Get`):
| keys | `map[string]bool` | `trie.TernaryST` | `trie.Trie` |
|:----:|:-----------------:|:----------------:|:-----------:|
| 4 | 7.36 ns/op | 24.1 ns/op | 28.4 ns/op |
| 8 | 7.37 ns/op | 24.3 ns/op | 28.3 ns/op |
| 16 | 28.6 ns/op | 33.4 ns/op | 35.0 ns/op |
| 32 | 24.6 ns/op | 33.7 ns/op | 35.3 ns/op |
| 64 | 25.1 ns/op | 33.2 ns/op | 35.2 ns/op |
| 512 | 24.4 ns/op | 38.5 ns/op | 42.0 ns/op |
| 1024 | 33.9 ns/op | 43.5 ns/op | 49.5 ns/op |
| 1M | 32.1 ns/op | 58.5 ns/op | 72.2 ns/op |License
=======
MIT, see ./LICENSE