Benchmarks to compare sorted maps and sets implemented in the Ordered Zig library with similar implementations in Rust, C, C++, and Java.
| Language | Sorted Maps | Sorted Sets |
|---|---|---|
| Zig | Ordered BTreeMap, CartesianTreeMap, and SkipListMap; std.Treap |
Ordered SortedSet and RedBlackTreeSet; std.Treap |
| Rust | std::collections::BTreeMap |
std::collections::BTreeSet |
| C | Klib kbtree with key-value entries |
Klib kbtree with keys |
| C++ | std::map and Abseil btree_map |
std::set and Abseil btree_set |
| Java | TreeMap<Long, Long> |
TreeSet<Long> |
For the steps below to work, you need to have Nix installed on your machine.
nix developgit clone https://github.com/CogitatorTech/benchmarks-ordered.git
cd benchmarks-orderedmake build
make benchThe results of the benchmarks are stored in the results directory.
See CONTRIBUTING.md for details on how to make a contribution.
This project is licensed under the MIT License (see LICENSE).