Hi all,
I’m pleased to announce xb5, a library providing B-tree (order 5) alternatives to OTP’s gb_trees and gb_sets, as well as a multiset with order-statistic operations.
For most operations, benchmarks show 1.2–2.5× faster execution compared to the stdlib, and equal or lower heap usage.
The three modules are:
- xb5_bag - ordered multiset with order-statistic O(log n) operations (rank, nth element, percentile)
- xb5_sets - ordered set, drop-in alternative to
gb_sets - xb5_trees - ordered key-value store, drop-in alternative to
gb_trees
Performance
All three modules were benchmarked together with gb_sets and gb_trees on two separate computers. All tests ran across three build types, and collection sizes from 0 through 15,000.
Two interactive performance reports are published:
Benchmarking code and raw data are available in the xb5_benchmark repo.
- Documentation
- Hex package
xb5_elixir, an idiomatic Elixir wrapper- Source code
