#sparse #set #structure #value #speed #iteration

nightly sparse_set

Implementation of the sparse set data structure

13 releases (7 breaking)

0.8.2 Jul 27, 2023
0.8.0 Apr 1, 2023
0.7.1 Jul 29, 2022

#1139 in Data structures

Download history 6/week @ 2024-02-22 4/week @ 2024-02-29 1/week @ 2024-03-07 1/week @ 2024-03-14 79/week @ 2024-03-21 9/week @ 2024-03-28

90 downloads per month

MIT/Apache

140KB
2.5K SLoC

Sparse Set

Crates.io Docs.rs CI

This crate is a sparse set implementation.

This won't go into detail on what it is, but instead I'll recommend reading https://research.swtch.com/sparse for a nice, succinct description.

One thing to note is that a separate buffer is used to store the actual indices. This makes a tradeoff between value insertion/removal and iteration speed.

Nightly is required and I have no motivation to change it as I use this crate for other projects on nightly.

License

Licensed under either of

at your option.

Contribution

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.

See CONTRIBUTING.md.

Dependencies