#set #sparse #structure #value #indices #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

#2203 in Data structures

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