107 releases (14 breaking)
new 0.16.0 | May 16, 2024 |
---|---|
0.15.1 | Apr 11, 2024 |
0.15.0-alpha.5 | Mar 29, 2024 |
0.12.0-alpha.2 | Dec 26, 2023 |
0.4.0 | Mar 28, 2023 |
#713 in Data structures
21,079 downloads per month
Used in 45 crates
(3 directly)
17KB
263 lines
Yet another string interning library
Part of the rerun
family of crates.
String interning is a way to reduce memory use by detecting duplicated string and storing them only once.
The main thing that makes this library different is that
InternedString
stores the hash of the string, which makes
using it in lookups is really fast, especially when using nohash_hasher::IntMap
.
The hash is assumed to be perfect, which means this library accepts the risk of hash collisions!
The interned strings are never freed, so don't intern too many things.
lib.rs
:
Yet another string interning library.
The main thing that makes this library different is that
InternedString
stores the hash of the string, which makes
using it in lookups is really fast, especially when using nohash_hasher::IntMap
.
The hash is assumed to be perfect, which means this library accepts the risk of hash collisions!
The interned strings are never freed, so don't intern too many things.
Dependencies
~1.2–6.5MB
~27K SLoC