Crates.io | arc-string-interner |
lib.rs | arc-string-interner |
version | 0.3.0-alpha2 |
source | src |
created_at | 2020-04-01 13:46:25.091381 |
updated_at | 2021-11-08 12:17:04.618347 |
description | An efficient cuncurrent string interning data structure with minimal memory-footprint and fast access to the underlying contents. |
homepage | |
repository | https://github.com/artemshein/arc-string-interner |
max_upload_size | |
id | 225206 |
size | 83,943 |
Linux | Windows | Codecov | Coveralls | Docs | Crates.io |
---|---|---|---|---|---|
A data structure to cache strings efficiently, with minimal memory footprint and the ability to assicate the interned strings with unique symbols. These symbols allow for constant time comparisons and look-ups to the underlying interned string contents. Also, iterating through the interned strings is cache efficient.
M
and a vector V
is used.V
stores the contents of interned strings while M
has internal references into the string of V
to avoid duplicates.V
stores the strings with an indirection to avoid iterator invalidation.Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
0.7.1
StringInterner::clone()
std::iter::Extend
for StringInterner
Sym::from_usize
now avoids using unsafe
codeFromIterator
impl of StringInterner
Thanks YOSHIOKA Takuma for implementing this release.
0.7.0
Symbol
for types that are From<usize>
and Into<usize>
StringInterner::clear
API since its usage breaks invariantsStringInterner::{capacity, reserve}
APIsSym
that is a thin wrapper around NonZeroU32
(idea by koute)DefaultStringInterner
a type alias for the new StringInterner<Sym>
FromIterator
impl to StringInterner<S: Sym>
html_root_url
to crate rootThanks matklad for suggestions and impulses
0.6.3
StringInterner
's Send
impl didn't respect its generic HashBuilder
parameter. Fixes GitHub issue #4.0.6.2
shrink_to_fit
public method to StringInterner
- (by artemshein)0.6.1
str
) was broken due to dangling pointers (Thanks to artemshein for fixing it!)0.6.0
PartialEq
implementation for StringInterner
StringInterner
generic over BuildHasher
to allow for custom hashers0.5.0
IntoIterator
trait implementation for StringInterner
0.4.0
Unsigned
for Symbol
0.3.3
added Send
and Sync
to InternalStrRef
to make StringInterner
itself Send
and Sync