petgraph / fixedbitset

A simple bitset container for Rust
https://docs.rs/fixedbitset/
Apache License 2.0
124 stars 47 forks source link

FixedBitSet with statically known size #30

Closed androm3da closed 5 years ago

androm3da commented 5 years ago

How about a FixedBitSet that uses static size, array representation and provides Copy trait? Like the standard library, it could probably be limited in the sizes it would support, but up to ~256 bits or so could be pretty useful for a lot of use cases.

androm3da commented 5 years ago

I can provide the implementation if it's considered useful. Otherwise I think I'll make another crate that's inspired by fixedbitset.

jrraymond commented 5 years ago

I think such a data structure would be useful in situations where allocation must be avoided and the size of the set is known at compile time. However such a data structure is fundamentally different from fixedbitset (which allows for dynamically sized sets) so should be contained in a separate crate. I would encourage you to do so!