#map #vector #memory #indices #collection #usize

densevec

Map like collection with usize indices that stores values contiguosly

8 releases

Uses old Rust 2015

0.3.6 Apr 18, 2022
0.3.5 Apr 16, 2020
0.3.4 Dec 3, 2019
0.3.3 Jan 29, 2019
0.1.0 Mar 16, 2018

#799 in Data structures

Download history 1/week @ 2022-01-30 9/week @ 2022-02-20 4/week @ 2022-02-27 34/week @ 2022-03-13 24/week @ 2022-03-20 23/week @ 2022-04-17 9/week @ 2022-04-24 35/week @ 2022-05-01

67 downloads per month

MIT license

53KB
1.5K SLoC

DenseVec

Map like collection with usize indices that stores values contiguosly in memory so iterating through them is as fast as iterating a vector.

The index uses a sparse vector so using very high numbers will lead to high memory usage

The API mimics that of HashMap and implements all it's features + some methods that are useful in this case like get_unchecked(_mut).

Dependencies

~0–435KB