94 releases (breaking)

0.92.0 Jan 20, 2023
0.91.0 Dec 21, 2022
0.90.1 Dec 1, 2022
0.90.0 Nov 21, 2022
0.25.0 Nov 27, 2018

#77 in Data structures

Download history 96391/week @ 2022-10-13 81743/week @ 2022-10-20 75118/week @ 2022-10-27 67565/week @ 2022-11-03 78952/week @ 2022-11-10 78510/week @ 2022-11-17 63790/week @ 2022-11-24 67563/week @ 2022-12-01 69937/week @ 2022-12-08 63160/week @ 2022-12-15 37312/week @ 2022-12-22 40002/week @ 2022-12-29 61148/week @ 2023-01-05 61606/week @ 2023-01-12 64802/week @ 2023-01-19 57700/week @ 2023-01-26

254,546 downloads per month
Used in 221 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