| Crates.io | linear_collections |
| lib.rs | linear_collections |
| version | 0.3.0 |
| created_at | 2024-05-02 11:06:45.444377+00 |
| updated_at | 2024-05-21 05:07:44.272552+00 |
| description | Map and Set types backed by linear data structures. |
| homepage | |
| repository | https://github.com/Jeremiah-Griffin/linear_collections |
| max_upload_size | |
| id | 1227648 |
| size | 41,723 |
Map and Set types backed by linear data structures.
Many use cases of maps are for small collections where the penalties of a comparable data structure from std (memory overhead, hashing throughput, indirection and potential cache dislocality of a nonlinear data structure) are greater than their comparatively reduced algorithmic complexity.
This penalty usually is not great, however, a (small) amount of performance may be gained if allocating small such structures in a tight loop - say, deserializing the claims from a Json Web Token.
There exists another crate implementing linear collection types (linear_map) however, it only supports collection backed by a vector: I personally needed Array types as well.
Fallible allocating apis
VecDeque backed types (nice if you need a vecdeque to be returned from into_inner())
Serde support for Array types via serde-big-array
Iterator Support
More tests