Hi all,
I’m pleased to announce xb5_elixir, a wrapper of xb5, providing B-tree (order 5) alternatives to OTP’s gb_trees and gb_sets, as well as a multiset with order-statistic operations.
If you need ordered collections, xb5 benchmarks show 1.2–2.5× faster execution compared to the OTP modules for most operations, and equal or lower heap usage.
The three Elixir modules are:
-
Xb5.Bag - ordered multiset with order-statistic O(log n) operations (rank, access by index, percentile)
Performance
The underlying Erlang 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.
-
Source code:
https://github.com/g-andrade/xb5_elixir
-
xb5, the underlying Erlang library



















