165 releases (19 breaking)

new 0.21.0-alpha.1 Dec 11, 2024
0.20.2 Nov 28, 2024
0.17.0 Jul 8, 2024
0.15.0-alpha.5 Mar 29, 2024
0.4.0 Mar 28, 2023

#523 in Data structures

Download history 9784/week @ 2024-08-23 8586/week @ 2024-08-30 8186/week @ 2024-09-06 6669/week @ 2024-09-13 7325/week @ 2024-09-20 4624/week @ 2024-09-27 5366/week @ 2024-10-04 7150/week @ 2024-10-11 5615/week @ 2024-10-18 4724/week @ 2024-10-25 6396/week @ 2024-11-01 6819/week @ 2024-11-08 6575/week @ 2024-11-15 6462/week @ 2024-11-22 7177/week @ 2024-11-29 5976/week @ 2024-12-06

27,716 downloads per month
Used in 72 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