#collection #associative #flat #memory-efficient #lookup #operation

flat_collections

Lightweight and memory-efficient associative data structures

2 unstable releases

0.2.0 Sep 13, 2024
0.1.0 Sep 13, 2024

#693 in Data structures

Download history 236/week @ 2024-09-10 47/week @ 2024-09-17 17/week @ 2024-09-24 10/week @ 2024-10-01 1/week @ 2024-10-08

110 downloads per month

Apache-2.0

14KB
339 lines

Flat Collections

A library that provides lightweight and memory-efficient associative data structures.

Asymptotics:

operation average worst best
lookup O(logn) O(logn) O(logn)
insert O(n) O(n) O(1)
remove O(n) O(n) O(1)

Insert and remove work in O(1) when dealing with last element.

Types:

  • FlatMap - mutable map, backed by Vec
  • FlatSet - mutable set, backed by FlatMap

No runtime deps