161 releases (94 breaking)

0.114.0 Nov 20, 2024
0.113.0 Oct 22, 2024
0.110.1 Jul 22, 2024
0.106.0 Mar 20, 2024
0.25.0 Nov 27, 2018

#90 in No standard library

Download history 132737/week @ 2024-08-16 124250/week @ 2024-08-23 124951/week @ 2024-08-30 121104/week @ 2024-09-06 108479/week @ 2024-09-13 125006/week @ 2024-09-20 113479/week @ 2024-09-27 129706/week @ 2024-10-04 126756/week @ 2024-10-11 132356/week @ 2024-10-18 129809/week @ 2024-10-25 135829/week @ 2024-11-01 119373/week @ 2024-11-08 123201/week @ 2024-11-15 123657/week @ 2024-11-22 132566/week @ 2024-11-29

521,358 downloads per month
Used in 556 crates (2 directly)

Apache-2.0 WITH LLVM-exception

235KB
5K SLoC

This crate contains array-based data structures used by the core Cranelift code generator which represent a set of small ordered sets or maps.

These are not general purpose data structures that are somehow magically faster that the standard library's BTreeSet and BTreeMap types.

The tradeoffs are different:

  • Keys and values are expected to be small and copyable. We optimize for 32-bit types.
  • A comparator object is used to compare keys, allowing smaller "context free" keys.
  • Empty trees have a very small 32-bit footprint.
  • All the trees in a forest can be cleared in constant time.

lib.rs:

A forest of B+-trees.

This crate provides a data structures representing a set of small ordered sets or maps. It is implemented as a forest of B+-trees all allocating nodes out of the same pool.

These are not general purpose data structures that are somehow magically faster that the standard library's BTreeSet and BTreeMap types.

The tradeoffs are different:

  • Keys and values are expected to be small and copyable. We optimize for 32-bit types.
  • A comparator object is used to compare keys, allowing smaller "context free" keys.
  • Empty trees have a very small 32-bit footprint.
  • All the trees in a forest can be cleared in constant time.

Dependencies