122 releases (15 breaking)

0.17.0 Jul 8, 2024
0.17.0-alpha.8 Jun 25, 2024
0.15.0-alpha.5 Mar 29, 2024
0.12.0-alpha.2 Dec 26, 2023
0.4.0 Mar 28, 2023

#802 in Data structures

Download history 4521/week @ 2024-04-04 6419/week @ 2024-04-11 5625/week @ 2024-04-18 4930/week @ 2024-04-25 5288/week @ 2024-05-02 6183/week @ 2024-05-09 7635/week @ 2024-05-16 7909/week @ 2024-05-23 5634/week @ 2024-05-30 6163/week @ 2024-06-06 6816/week @ 2024-06-13 8713/week @ 2024-06-20 9017/week @ 2024-06-27 10886/week @ 2024-07-04 10548/week @ 2024-07-11 10179/week @ 2024-07-18

41,982 downloads per month
Used in 53 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–6.5MB
~27K SLoC