platanus is a modern fork of the B-tree library cpp-btree.
To make cpp-btree more accessible for use in modern C++ projects.
- Support for C++20
- Available as a CMake package
- Support for std::pmr
- Three-way comparison implementation
- Improved testing and CI setup
- Enhanced readability and maintainability
- Benchmarking against STL and Abseil
#include <platanus/btree_map.hpp>
int main()
{
platanus::btree_map<int, int> values;
values.emplace(1, 100);
values.emplace(2, 200);
}In certain scenarios, it demonstrates superior search and insertion performance compared to std::map. Other cases may favor Abseil's B-tree implementation.
See here.
For local preview and static builds of the documentation site:
zensical serve
zensical buildYou can build the benchmark with:
cmake -S . -B build/release -DPLATANUS_BUILD_BENCHMARK=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build/release --target btree_benchWhen PLATANUS_BENCHMARK_WITH_ABSL=ON (default), the benchmark runs in comparison mode and registers:
STLabslplatanus(64)
In that mode, platanus(128) and platanus::pmr benchmark variants are intentionally excluded.
See the documentation site for more benchmark details and plotting scripts.
platanus is licensed under Apache License, Version 2.0.

