Does what it says on the tin. Requires #119 first.
LinearMap and LinearSet are map and set types built on top of a Vec by simply doing linear search for key/element. Although this means O(len) scaling on random access operations, it will still likely be faster (and certainly less memory footprint) for small numbers of elements, easy to compare key types, and small element size... which is true in a great many cases!
The implementation is taken from the linear_map crate, but elected to be copied into this repository with a few modifications, since that crate is no longer actively maintained (though it is a good base, as it was written by gankra, the same person that did a lot of the initial work that still stands on the std Vec, VecDeque, and other std containers in Rust).
Does what it says on the tin. Requires #119 first.
LinearMap
andLinearSet
are map and set types built on top of aVec
by simply doing linear search for key/element. Although this means O(len) scaling on random access operations, it will still likely be faster (and certainly less memory footprint) for small numbers of elements, easy to compare key types, and small element size... which is true in a great many cases!The implementation is taken from the
linear_map
crate, but elected to be copied into this repository with a few modifications, since that crate is no longer actively maintained (though it is a good base, as it was written by gankra, the same person that did a lot of the initial work that still stands on the std Vec, VecDeque, and other std containers in Rust).