100 releases (13 breaking)

0.15.1 Apr 11, 2024
0.15.0-alpha.5 Mar 29, 2024
0.12.0-alpha.2 Dec 26, 2023
0.11.0 Nov 28, 2023
0.4.0 Mar 28, 2023

#670 in Data structures

Download history 1134/week @ 2024-01-03 586/week @ 2024-01-10 869/week @ 2024-01-17 933/week @ 2024-01-24 1029/week @ 2024-01-31 1312/week @ 2024-02-07 3153/week @ 2024-02-14 4172/week @ 2024-02-21 6050/week @ 2024-02-28 5009/week @ 2024-03-06 4950/week @ 2024-03-13 3178/week @ 2024-03-20 2883/week @ 2024-03-27 4502/week @ 2024-04-03 6144/week @ 2024-04-10 4588/week @ 2024-04-17

18,705 downloads per month
Used in 43 crates (3 directly)

MIT/Apache

13KB
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–7.5MB
~26K SLoC