Top 3.4% dependent packages on proxy.golang.org
proxy.golang.org : github.com/google/triemap
Package triemap allows creating a map out of `[]rune` and `[]byte` without casting with `string(v)`. Due to lack of generics the values are stored and retrieved as `interface{}` and require type asserting like `m.Get(k).(Foo)`. Compared to casting a rune or byte slice to a string, putting data in the map is actually better using the std map like `m[string(k)] = v`, however getting data out of the map is much faster with the `RuneSliceMap`. `ByteSliceMap` is always slower than casting to string and using a standard map, but it reduces allocations, so it's a decent alternative on memory-constrained resources. `RuneSliceMap` performs much faster and produces less allocations than casting to string and using standard maps.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/google/triemap
License: Apache-2.0
Latest release: almost 5 years ago
First release: almost 5 years ago
Namespace: github.com/google
Dependent packages: 2
Stars: 14 on GitHub
Forks: 3 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 25 days ago