58 breaking releases

0.78.0 Oct 29, 2021
0.76.0 Aug 2, 2021
0.75.0 Jun 9, 2021
0.72.0 Mar 16, 2021
0.25.0 Nov 27, 2018

#15 in No standard library

Download history 21447/week @ 2021-08-15 22673/week @ 2021-08-22 20240/week @ 2021-08-29 21411/week @ 2021-09-05 27625/week @ 2021-09-12 25107/week @ 2021-09-19 25574/week @ 2021-09-26 24484/week @ 2021-10-03 27670/week @ 2021-10-10 26231/week @ 2021-10-17 22266/week @ 2021-10-24 23688/week @ 2021-10-31 25383/week @ 2021-11-07 26312/week @ 2021-11-14 23829/week @ 2021-11-21 38575/week @ 2021-11-28

116,141 downloads per month
Used in 129 crates (via cranelift-codegen)

Apache-2.0 WITH LLVM-exception

225KB
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

|a