169 releases (98 breaking)

0.118.0 Mar 20, 2025
0.116.1 Jan 21, 2025
0.115.0 Dec 20, 2024
0.114.0 Nov 20, 2024
0.25.0 Nov 27, 2018

#135 in No standard library

Download history 60954/week @ 2024-12-24 88126/week @ 2024-12-31 135801/week @ 2025-01-07 155541/week @ 2025-01-14 146592/week @ 2025-01-21 143308/week @ 2025-01-28 173524/week @ 2025-02-04 156711/week @ 2025-02-11 167644/week @ 2025-02-18 157099/week @ 2025-02-25 177397/week @ 2025-03-04 185293/week @ 2025-03-11 189678/week @ 2025-03-18 169292/week @ 2025-03-25 152570/week @ 2025-04-01 175150/week @ 2025-04-08

729,596 downloads per month
Used in 624 crates (2 directly)

Apache-2.0 WITH LLVM-exception

240KB
5K SLoC

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.

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.

Dependencies