10 releases (breaking)

0.8.1 Apr 8, 2024
0.8.0 Feb 9, 2024
0.7.1 Jan 15, 2024
0.7.0 Dec 30, 2023
0.1.0 Sep 11, 2021

#790 in Data structures

Download history 62/week @ 2024-06-17 43/week @ 2024-06-24 63/week @ 2024-07-01 42/week @ 2024-07-08 85/week @ 2024-07-15 56/week @ 2024-07-22 34/week @ 2024-07-29 49/week @ 2024-08-05 44/week @ 2024-08-12 41/week @ 2024-08-19 105/week @ 2024-08-26 93/week @ 2024-09-02 31/week @ 2024-09-09 21/week @ 2024-09-16 106/week @ 2024-09-23 18/week @ 2024-09-30

184 downloads per month
Used in 8 crates (2 directly)

MIT/Apache

120KB
3K SLoC

im-lists

Actions Status Coverage Status Crate Status Docs Status

An implementation of a persistent unrolled linked list and vlist. This linked list is implemented with a backing of either Arc or Rc, for single or multi-threaded environments. The single threaded list can be found as a List, and the thread-safe implementation can be found as a SharedList. It is generic over smart pointer - so if you would like to use this with a custom smart pointer (i.e. something like a Gc) then you can do so.

An unrolled linked list is a linked list where each node contains a vector of elements. While the algorithmic complexity is the same as a normal naive linked list, storing elements in vectors improves cache locality and also gives practical speed ups on common operations. A Vlist is like an unrolled linked list, however the vector capacity in each node grows exponentially. This also means that operations that need to iterate over nodes run in O(log(n)) time.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING.md.

Dependencies