#vector #arena #stash #index #actor

no-std multi-stash

Vector-based arena data structure that reuses vacant slots

2 unstable releases

0.2.0 Nov 18, 2023
0.1.0 Nov 17, 2023

#1692 in Data structures

Download history 280/week @ 2024-03-14 337/week @ 2024-03-21 252/week @ 2024-03-28 640/week @ 2024-04-04 876/week @ 2024-04-11 444/week @ 2024-04-18 360/week @ 2024-04-25 778/week @ 2024-05-02 421/week @ 2024-05-09 633/week @ 2024-05-16 1008/week @ 2024-05-23 2947/week @ 2024-05-30 11612/week @ 2024-06-06 22706/week @ 2024-06-13 23514/week @ 2024-06-20 16461/week @ 2024-06-27

74,396 downloads per month
Used in 9 crates (via wasmi)

MIT/Apache

29KB
628 lines

MultiStash

A vector-like data structure that is able to reuse slots for new elements.

Specifically allows for (armortized) O(1) instructions for:

  • MultiStash::put
  • MultiStash::take_one
  • MultiStash::take_all
  • MultiStash::get
  • MultiStash::get_mut

License

multi-stash is primarily distributed under the terms of both the MIT license and the APACHE license (Version 2.0), at your choice.

See LICENSE-APACHE and LICENSE-MIT for details.

No runtime deps