113 releases (15 breaking)

0.17.0-alpha.4 Jun 10, 2024
0.16.1 May 29, 2024
0.15.0-alpha.5 Mar 29, 2024
0.12.0-alpha.2 Dec 26, 2023
0.4.0 Mar 28, 2023

#736 in Data structures

Download history 5950/week @ 2024-03-01 4959/week @ 2024-03-08 4616/week @ 2024-03-15 3154/week @ 2024-03-22 3197/week @ 2024-03-29 5064/week @ 2024-04-05 5966/week @ 2024-04-12 5873/week @ 2024-04-19 4785/week @ 2024-04-26 4420/week @ 2024-05-03 7753/week @ 2024-05-10 7842/week @ 2024-05-17 6551/week @ 2024-05-24 6255/week @ 2024-05-31 6170/week @ 2024-06-07 5498/week @ 2024-06-14

26,439 downloads per month
Used in 51 crates (4 directly)

MIT/Apache

17KB
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.2–7MB
~27K SLoC