#b-tree #forest #set #map

no-std alexcrichton-cranelift-bforest

A forest of B+-trees

2 unstable releases

0.53.0 Jan 10, 2020
0.52.0 Jan 10, 2020

#10 in #btree

Download history 28/week @ 2024-03-14 36/week @ 2024-03-21 76/week @ 2024-03-28 32/week @ 2024-04-04 48/week @ 2024-04-11 61/week @ 2024-04-18 44/week @ 2024-04-25 32/week @ 2024-05-02 32/week @ 2024-05-09 33/week @ 2024-05-16 28/week @ 2024-05-23 26/week @ 2024-05-30 21/week @ 2024-06-06 23/week @ 2024-06-13 31/week @ 2024-06-20 14/week @ 2024-06-27

95 downloads per month
Used in 11 crates (via alexcrichton-cranelift-co…)

Apache-2.0 WITH LLVM-exception

210KB
4.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