155 releases (18 breaking)

new 0.20.0 Nov 14, 2024
0.19.1 Nov 5, 2024
0.17.0 Jul 8, 2024
0.15.0-alpha.5 Mar 29, 2024
0.4.0 Mar 28, 2023

#483 in Data structures

Download history 11586/week @ 2024-07-28 12357/week @ 2024-08-04 12781/week @ 2024-08-11 13053/week @ 2024-08-18 9633/week @ 2024-08-25 8004/week @ 2024-09-01 7899/week @ 2024-09-08 6560/week @ 2024-09-15 7646/week @ 2024-09-22 4124/week @ 2024-09-29 5460/week @ 2024-10-06 7207/week @ 2024-10-13 5229/week @ 2024-10-20 5249/week @ 2024-10-27 6792/week @ 2024-11-03 6292/week @ 2024-11-10

24,008 downloads per month
Used in 69 crates (3 directly)

MIT/Apache

18KB
263 lines

Yet another string interning library

Part of the rerun family of crates.

Latest version Documentation MIT Apache

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.1–6MB
~26K SLoC