Performance focused header-only container library. Currently primarily contains a fast B+Tree implementation.
C++
75
423 commits
updated Jan 6, 2026
High-performance header-only container library for C++23 on x86-64.
kressler::fast_containers::btree) - Cache-friendly B+tree with SIMD search and hugepage supportkressler::fast_containers::dense_map) - Fixed-size sorted array used internally by btree nodesHugePageAllocator - Single-size allocator for uniform allocationsMultiSizeHugePageAllocator - Multi-size pooling for variable-sized allocations (e.g., Abseil btree)PolicyBasedHugePageAllocator - Advanced control with shared poolsThe B+tree implementation provides significant performance improvements over industry standards for large trees. For some workloads with large trees, we've observed:
See benchmark results for detailed performance analysis.
Important qualifications:
Key advantages over Abseil's btree:
Work in progress This is a work in progress. I don't have plans for major changes to the B+tree currently, but am actively cleaning up the implementation.
Platforms This library is really only built and tested on Linux, on x86-64 CPUs with AVX2 support. In theory, it could be built for Windows, though that hasn't been tested. The SIMD implementations are x86-64 specific. Timing in the custom benchmarks is also x86-64 specific (via use of rdtscp).
History/Motivations This project started as an exploration of using AI agents for software development. Based on experience tuning systems using Abseil's B+tree, I was curious if performance could be improved through SIMD instructions, a customized allocator, and tunable node sizes. Claude proved surprisingly adept at helping implement this quickly, and the resulting B+tree showed compelling performance improvements, so I'm making it available here.
Prerequisites:
Include in your project:
Add as a git submodule:
git submodule add https://github.com/kressler/fast-containers.git third_party/fast-containers
Link in CMakeLists.txt:
add_subdirectory(third_party/fast-containers)
target_link_libraries(your_target PRIVATE fast_containers::fast_containers)
Include headers:
#include <fast_containers/btree.hpp>
#include <fast_containers/hugepage_allocator.hpp>
#include <fast_containers/btree.hpp>
#include <cstdint>
#include <iostream>
int main() {
// Create a btree mapping int64_t keys to int32_t values
// Using defaults: auto-computed node sizes, Linear search
using Tree = kressler::fast_containers::btree<int64_t, int32_t>;
Tree tree;
// Insert key-value pairs
tree.insert(42, 100);
tree.insert(17, 200);
tree.insert(99, 300);
// Find a value
auto it = tree.find(42);
if (it != tree.end()) {
std::cout << "Found: " << it->second << std::endl; // Prints: 100
}
// Iterate over all elements (sorted by key)
for (const auto& [key, value] : tree) {
std::cout << key << " -> " << value << std::endl;
}
// Erase an element
tree.erase(17);
// Check size
std::cout << "Size: " << tree.size() << std::endl; // Prints: 2
}
#include <fast_containers/btree.hpp>
#include <fast_containers/hugepage_allocator.hpp>
#include <cstdint>
#include <cassert>
int main() {
// Use the hugepage allocator for 3-5× performance improvement
// Allocator type must match the btree's value_type (std::pair<Key, Value>)
using Allocator = kressler::fast_containers::HugePageAllocator<
std::pair<int64_t, int32_t>>;
using Tree = kressler::fast_containers::btree<
int64_t, // Key type
int32_t, // Value type
96, // Leaf node size
128, // Internal node size
std::less<int64_t>, // Comparator
kressler::fast_containers::SearchMode::SIMD, // SIMD search
Allocator // Hugepage allocator
>;
// Tree will default-construct the allocator (256MB initial pool, 64MB growth)
// The btree automatically creates separate pools for leaf and internal nodes
Tree tree;
// Insert 10 million elements - hugepages reduce TLB misses
for (int64_t i = 0; i < 10'000'000; ++i) {
tree.insert(i, i * 2);
}
// Find operations are much faster with hugepages
auto it = tree.find(5'000'000);
assert(it != tree.end() && it->second == 10'000'000);
}
For multiple trees or fine-grained control over pool sizes, use PolicyBasedHugePageAllocator:
#include <fast_containers/btree.hpp>
#include <fast_containers/policy_based_hugepage_allocator.hpp>
#include <cstdint>
int main() {
// Create separate pools for leaf and internal nodes with custom sizes
auto leaf_pool = std::make_shared<kressler::fast_containers::HugePagePool>(
512 * 1024 * 1024, true); // 512MB for leaves
auto internal_pool = std::make_shared<kressler::fast_containers::HugePagePool>(
256 * 1024 * 1024, true); // 256MB for internals
// Create policy that routes types to appropriate pools
kressler::fast_containers::TwoPoolPolicy policy{leaf_pool, internal_pool};
// Create allocator with the policy
using Allocator = kressler::fast_containers::PolicyBasedHugePageAllocator<
std::pair<int64_t, int32_t>,
kressler::fast_containers::TwoPoolPolicy>;
Allocator alloc(policy);
using Tree = kressler::fast_containers::btree<
int64_t, int32_t, 96, 128, std::less<int64_t>,
kressler::fast_containers::SearchMode::SIMD, Allocator>;
// Multiple trees can share the same pools
Tree tree1(alloc);
Tree tree2(alloc);
// Both trees share leaf_pool for leaves and internal_pool for internals
tree1.insert(1, 100);
tree2.insert(2, 200);
}
For containers that allocate variable-sized objects (like absl::btree_map), use MultiSizeHugePageAllocator:
#include <fast_containers/multi_size_hugepage_allocator.hpp>
#include <absl/container/btree_map.h>
#include <array>
#include <cstdint>
int main() {
// absl::btree_map allocates different-sized nodes (leaf vs internal)
// MultiSizeHugePageAllocator routes allocations to size-class-specific pools
using ValueType = std::array<std::byte, 32>;
using Allocator = kressler::fast_containers::MultiSizeHugePageAllocator<
std::pair<const int64_t, ValueType>>;
// Helper function creates allocator with default settings
// - 64MB initial size per size class
// - Hugepages enabled
// - 64MB growth size per size class
auto alloc = kressler::fast_containers::make_multi_size_hugepage_allocator<
std::pair<const int64_t, ValueType>>();
// Create absl::btree_map with hugepage allocator
absl::btree_map<int64_t, ValueType, std::less<int64_t>, Allocator> tree(alloc);
// Insert 1 million elements - multiple size classes created automatically
for (int64_t i = 0; i < 1'000'000; ++i) {
tree[i] = ValueType{};
}
// Find operations benefit from reduced TLB misses
auto it = tree.find(500'000);
}
How it works:
HugePagePool with uniform-sized blocksabsl::btree_map over standard allocatorWhen to use each allocator:
HugePageAllocator: Simple, automatic separate pools per type (recommended for our btree)MultiSizeHugePageAllocator: Variable-sized allocations (e.g., absl::btree_map, other STL containers with allocator support)PolicyBasedHugePageAllocator: Fine-grained control, shared pools across trees, custom pool sizesThe btree class provides an API similar to std::map:
Insertion:
std::pair<iterator, bool> insert(const Key& key, const Value& value)std::pair<iterator, bool> emplace(Args&&... args)Value& operator[](const Key& key)Lookup:
iterator find(const Key& key)const_iterator find(const Key& key) constiterator lower_bound(const Key& key)iterator upper_bound(const Key& key)std::pair<iterator, iterator> equal_range(const Key& key)Removal:
size_type erase(const Key& key)iterator erase(iterator pos)Iteration:
iterator begin() / const_iterator begin() constiterator end() / const_iterator end() constCapacity:
size_type size() constbool empty() constvoid clear()Other:
void swap(btree& other) noexceptkey_compare key_comp() constvalue_compare value_comp() consttemplate <
typename Key,
typename Value,
std::size_t LeafNodeSize = default_leaf_node_size<Key, Value>(),
std::size_t InternalNodeSize = default_internal_node_size<Key>(),
typename Compare = std::less<Key>,
SearchMode SearchModeT = SearchMode::Linear,
typename Allocator = std::allocator<std::pair<Key, Value>>
>
class btree;
Parameters:
Key, Value: The key and value types
LeafNodeSize: Number of key-value pairs per leaf node
2048 / (sizeof(Key) + sizeof(Value)), rounded to multiple of 8, clamped to [8, 64]InternalNodeSize: Number of child pointers per internal node
1024 / (sizeof(Key) + sizeof(void*)), rounded to multiple of 8, clamped to [16, 64]Compare: Comparison function (must satisfy ComparatorCompatible<Key, Compare>)
std::less<Key>std::greater<Key> for descending orderSearchMode: How to search within a node
SearchMode::Linear (scalar linear search)SearchMode::SIMD: AVX2-accelerated search (3-10% faster, requires AVX2 CPU and SIMD-compatible keys: int32_t, uint32_t, int64_t, uint64_t, float, double)SearchMode::Binary: Binary searchAllocator: Memory allocation strategy
std::allocator<std::pair<Key, Value>>HugePageAllocator<std::pair<Key, Value>> for working sets >1GB (3-5× faster)
sudo sysctl -w vm.nr_hugepages=<num_pages>MultiSizeHugePageAllocator<std::pair<Key, Value>>
absl::btree_map or other containers that allocate different-sized objectsPolicyBasedHugePageAllocator<std::pair<Key, Value>, TwoPoolPolicy>
Benchmarks comparing against Abseil's btree_map and std::map are available in results/btree_benchmark_results.md.
Our btree with hugepages (btree_8_32_96_128_simd_hp):
Our btree with standard allocator (btree_8_32_96_128_simd):
vs. Abseil btree with hugepages (absl_8_32_hp using MultiSizeHugePageAllocator):
vs. Abseil btree with standard allocator (absl_8_32):
vs. std::map (map_8_32):
Hugepage allocators provide massive performance improvements:
MultiSizeHugePageAllocator vs. standard allocatorOur implementation maintains significant advantages even with fair comparison:
Performance varies by tree size:
The hugepage allocator is the single most important optimization, providing benefits by reducing TLB misses (helps find operations) and making allocations extremely cheap through pooling (helps insert/erase operations).
# List available presets
cmake --list-presets
# Configure, build, and test in one workflow
cmake --preset release
cmake --build --preset release
ctest --preset release
# Common presets:
cmake --preset debug # Debug build
cmake --preset release # Release with AVX2 (default)
cmake --preset asan # AddressSanitizer build
cmake --preset release-no-avx2 # Release without AVX2
# Clone with submodules
git clone --recursive https://github.com/kressler/fast-containers.git
cd fast-containers
# Configure
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# Build
cmake --build build
# Run tests
ctest --test-dir build --output-on-failure
| Option | Default | Description |
|---|---|---|
ENABLE_AVX2 | ON (Release), OFF (Debug) | Enable AVX2 SIMD optimizations |
ENABLE_ASAN | OFF | Enable AddressSanitizer |
ENABLE_ALLOCATOR_STATS | OFF | Enable allocator statistics |
ENABLE_LTO | ON | Enable Link-Time Optimization |
ENABLE_NUMA | Auto-detected | Enable NUMA support (requires libnuma) |
Clone with submodules:
git clone --recursive https://github.com/kressler/fast-containers.git
cd fast-containers
One-time development setup:
./setup-dev.sh
This installs pre-commit hooks and configures clang-tidy.
Automatic formatting and checks (via pre-commit hook):
git commit # Automatically formats code and runs clang-tidy
The pre-commit hook will:
Manual formatting:
cmake --build build --target format
Manual static analysis:
cmake --build build --target clang-tidy
# Or manually:
clang-tidy-19 -p cmake-build-clang-tidy include/fast_containers/*.hpp
Requirements:
Bypass hook (when needed):
git commit --no-verify
Make your changes
Build and test:
cmake --build build && ctest --test-dir build
Commit (auto-formatted and checked):
git add .
git commit -m "Your changes"
# Pre-commit hook runs automatically
cmake --build build --target format before submitting PRs.
├── include/
│ └── fast_containers/ # Public header files
│ ├── btree.hpp, btree.ipp
│ ├── dense_map.hpp, dense_map.ipp
│ ├── hugepage_allocator.hpp
│ ├── multi_size_hugepage_allocator.hpp
│ ├── multi_size_hugepage_pool.hpp
│ ├── policy_based_hugepage_allocator.hpp
│ └── hugepage_pool.hpp
├── tests/ # Unit tests (Catch2)
│ ├── test_btree.cpp
│ ├── test_dense_map.cpp
│ ├── test_hugepage_allocator.cpp
│ └── test_policy_based_allocator.cpp
├── src/
│ ├── benchmarks/ # Google Benchmark performance tests
│ │ ├── dense_map_search_benchmark.cpp
│ │ └── hugepage_allocator_benchmark.cpp
│ └── binary/ # Standalone benchmark executables
│ ├── btree_benchmark.cpp
│ └── btree_stress.cpp
├── scripts/
│ └── interleaved_btree_benchmark.py # A/B testing harness
├── results/
│ └── btree_benchmark_results.md # Performance analysis
├── third_party/ # Git submodules
│ ├── catch2/ # Unit testing framework
│ ├── benchmark/ # Google Benchmark
│ ├── histograms/ # Latency histogram library
│ ├── abseil-cpp/ # Comparison baseline
│ ├── lyra/ # Command-line parsing
│ └── unordered_dense/ # Dense hash map
├── hooks/ # Git hooks (install with setup-dev.sh)
│ └── pre-commit # Auto-format and clang-tidy
└── CMakeLists.txt # Build configuration
423 commits
C++
92.7%
Python
3.5%
CMake
2.4%
Shell
1.4%
Performance focused header-only container library. Currently primarily contains a fast B+Tree implementation.
C++
75
423 commits
updated Jan 6, 2026
High-performance header-only container library for C++23 on x86-64.
kressler::fast_containers::btree) - Cache-friendly B+tree with SIMD search and hugepage supportkressler::fast_containers::dense_map) - Fixed-size sorted array used internally by btree nodesHugePageAllocator - Single-size allocator for uniform allocationsMultiSizeHugePageAllocator - Multi-size pooling for variable-sized allocations (e.g., Abseil btree)PolicyBasedHugePageAllocator - Advanced control with shared poolsThe B+tree implementation provides significant performance improvements over industry standards for large trees. For some workloads with large trees, we've observed:
See benchmark results for detailed performance analysis.
Important qualifications:
Key advantages over Abseil's btree:
Work in progress This is a work in progress. I don't have plans for major changes to the B+tree currently, but am actively cleaning up the implementation.
Platforms This library is really only built and tested on Linux, on x86-64 CPUs with AVX2 support. In theory, it could be built for Windows, though that hasn't been tested. The SIMD implementations are x86-64 specific. Timing in the custom benchmarks is also x86-64 specific (via use of rdtscp).
History/Motivations This project started as an exploration of using AI agents for software development. Based on experience tuning systems using Abseil's B+tree, I was curious if performance could be improved through SIMD instructions, a customized allocator, and tunable node sizes. Claude proved surprisingly adept at helping implement this quickly, and the resulting B+tree showed compelling performance improvements, so I'm making it available here.
Prerequisites:
Include in your project:
Add as a git submodule:
git submodule add https://github.com/kressler/fast-containers.git third_party/fast-containers
Link in CMakeLists.txt:
add_subdirectory(third_party/fast-containers)
target_link_libraries(your_target PRIVATE fast_containers::fast_containers)
Include headers:
#include <fast_containers/btree.hpp>
#include <fast_containers/hugepage_allocator.hpp>
#include <fast_containers/btree.hpp>
#include <cstdint>
#include <iostream>
int main() {
// Create a btree mapping int64_t keys to int32_t values
// Using defaults: auto-computed node sizes, Linear search
using Tree = kressler::fast_containers::btree<int64_t, int32_t>;
Tree tree;
// Insert key-value pairs
tree.insert(42, 100);
tree.insert(17, 200);
tree.insert(99, 300);
// Find a value
auto it = tree.find(42);
if (it != tree.end()) {
std::cout << "Found: " << it->second << std::endl; // Prints: 100
}
// Iterate over all elements (sorted by key)
for (const auto& [key, value] : tree) {
std::cout << key << " -> " << value << std::endl;
}
// Erase an element
tree.erase(17);
// Check size
std::cout << "Size: " << tree.size() << std::endl; // Prints: 2
}
#include <fast_containers/btree.hpp>
#include <fast_containers/hugepage_allocator.hpp>
#include <cstdint>
#include <cassert>
int main() {
// Use the hugepage allocator for 3-5× performance improvement
// Allocator type must match the btree's value_type (std::pair<Key, Value>)
using Allocator = kressler::fast_containers::HugePageAllocator<
std::pair<int64_t, int32_t>>;
using Tree = kressler::fast_containers::btree<
int64_t, // Key type
int32_t, // Value type
96, // Leaf node size
128, // Internal node size
std::less<int64_t>, // Comparator
kressler::fast_containers::SearchMode::SIMD, // SIMD search
Allocator // Hugepage allocator
>;
// Tree will default-construct the allocator (256MB initial pool, 64MB growth)
// The btree automatically creates separate pools for leaf and internal nodes
Tree tree;
// Insert 10 million elements - hugepages reduce TLB misses
for (int64_t i = 0; i < 10'000'000; ++i) {
tree.insert(i, i * 2);
}
// Find operations are much faster with hugepages
auto it = tree.find(5'000'000);
assert(it != tree.end() && it->second == 10'000'000);
}
For multiple trees or fine-grained control over pool sizes, use PolicyBasedHugePageAllocator:
#include <fast_containers/btree.hpp>
#include <fast_containers/policy_based_hugepage_allocator.hpp>
#include <cstdint>
int main() {
// Create separate pools for leaf and internal nodes with custom sizes
auto leaf_pool = std::make_shared<kressler::fast_containers::HugePagePool>(
512 * 1024 * 1024, true); // 512MB for leaves
auto internal_pool = std::make_shared<kressler::fast_containers::HugePagePool>(
256 * 1024 * 1024, true); // 256MB for internals
// Create policy that routes types to appropriate pools
kressler::fast_containers::TwoPoolPolicy policy{leaf_pool, internal_pool};
// Create allocator with the policy
using Allocator = kressler::fast_containers::PolicyBasedHugePageAllocator<
std::pair<int64_t, int32_t>,
kressler::fast_containers::TwoPoolPolicy>;
Allocator alloc(policy);
using Tree = kressler::fast_containers::btree<
int64_t, int32_t, 96, 128, std::less<int64_t>,
kressler::fast_containers::SearchMode::SIMD, Allocator>;
// Multiple trees can share the same pools
Tree tree1(alloc);
Tree tree2(alloc);
// Both trees share leaf_pool for leaves and internal_pool for internals
tree1.insert(1, 100);
tree2.insert(2, 200);
}
For containers that allocate variable-sized objects (like absl::btree_map), use MultiSizeHugePageAllocator:
#include <fast_containers/multi_size_hugepage_allocator.hpp>
#include <absl/container/btree_map.h>
#include <array>
#include <cstdint>
int main() {
// absl::btree_map allocates different-sized nodes (leaf vs internal)
// MultiSizeHugePageAllocator routes allocations to size-class-specific pools
using ValueType = std::array<std::byte, 32>;
using Allocator = kressler::fast_containers::MultiSizeHugePageAllocator<
std::pair<const int64_t, ValueType>>;
// Helper function creates allocator with default settings
// - 64MB initial size per size class
// - Hugepages enabled
// - 64MB growth size per size class
auto alloc = kressler::fast_containers::make_multi_size_hugepage_allocator<
std::pair<const int64_t, ValueType>>();
// Create absl::btree_map with hugepage allocator
absl::btree_map<int64_t, ValueType, std::less<int64_t>, Allocator> tree(alloc);
// Insert 1 million elements - multiple size classes created automatically
for (int64_t i = 0; i < 1'000'000; ++i) {
tree[i] = ValueType{};
}
// Find operations benefit from reduced TLB misses
auto it = tree.find(500'000);
}
How it works:
HugePagePool with uniform-sized blocksabsl::btree_map over standard allocatorWhen to use each allocator:
HugePageAllocator: Simple, automatic separate pools per type (recommended for our btree)MultiSizeHugePageAllocator: Variable-sized allocations (e.g., absl::btree_map, other STL containers with allocator support)PolicyBasedHugePageAllocator: Fine-grained control, shared pools across trees, custom pool sizesThe btree class provides an API similar to std::map:
Insertion:
std::pair<iterator, bool> insert(const Key& key, const Value& value)std::pair<iterator, bool> emplace(Args&&... args)Value& operator[](const Key& key)Lookup:
iterator find(const Key& key)const_iterator find(const Key& key) constiterator lower_bound(const Key& key)iterator upper_bound(const Key& key)std::pair<iterator, iterator> equal_range(const Key& key)Removal:
size_type erase(const Key& key)iterator erase(iterator pos)Iteration:
iterator begin() / const_iterator begin() constiterator end() / const_iterator end() constCapacity:
size_type size() constbool empty() constvoid clear()Other:
void swap(btree& other) noexceptkey_compare key_comp() constvalue_compare value_comp() consttemplate <
typename Key,
typename Value,
std::size_t LeafNodeSize = default_leaf_node_size<Key, Value>(),
std::size_t InternalNodeSize = default_internal_node_size<Key>(),
typename Compare = std::less<Key>,
SearchMode SearchModeT = SearchMode::Linear,
typename Allocator = std::allocator<std::pair<Key, Value>>
>
class btree;
Parameters:
Key, Value: The key and value types
LeafNodeSize: Number of key-value pairs per leaf node
2048 / (sizeof(Key) + sizeof(Value)), rounded to multiple of 8, clamped to [8, 64]InternalNodeSize: Number of child pointers per internal node
1024 / (sizeof(Key) + sizeof(void*)), rounded to multiple of 8, clamped to [16, 64]Compare: Comparison function (must satisfy ComparatorCompatible<Key, Compare>)
std::less<Key>std::greater<Key> for descending orderSearchMode: How to search within a node
SearchMode::Linear (scalar linear search)SearchMode::SIMD: AVX2-accelerated search (3-10% faster, requires AVX2 CPU and SIMD-compatible keys: int32_t, uint32_t, int64_t, uint64_t, float, double)SearchMode::Binary: Binary searchAllocator: Memory allocation strategy
std::allocator<std::pair<Key, Value>>HugePageAllocator<std::pair<Key, Value>> for working sets >1GB (3-5× faster)
sudo sysctl -w vm.nr_hugepages=<num_pages>MultiSizeHugePageAllocator<std::pair<Key, Value>>
absl::btree_map or other containers that allocate different-sized objectsPolicyBasedHugePageAllocator<std::pair<Key, Value>, TwoPoolPolicy>
Benchmarks comparing against Abseil's btree_map and std::map are available in results/btree_benchmark_results.md.
Our btree with hugepages (btree_8_32_96_128_simd_hp):
Our btree with standard allocator (btree_8_32_96_128_simd):
vs. Abseil btree with hugepages (absl_8_32_hp using MultiSizeHugePageAllocator):
vs. Abseil btree with standard allocator (absl_8_32):
vs. std::map (map_8_32):
Hugepage allocators provide massive performance improvements:
MultiSizeHugePageAllocator vs. standard allocatorOur implementation maintains significant advantages even with fair comparison:
Performance varies by tree size:
The hugepage allocator is the single most important optimization, providing benefits by reducing TLB misses (helps find operations) and making allocations extremely cheap through pooling (helps insert/erase operations).
# List available presets
cmake --list-presets
# Configure, build, and test in one workflow
cmake --preset release
cmake --build --preset release
ctest --preset release
# Common presets:
cmake --preset debug # Debug build
cmake --preset release # Release with AVX2 (default)
cmake --preset asan # AddressSanitizer build
cmake --preset release-no-avx2 # Release without AVX2
# Clone with submodules
git clone --recursive https://github.com/kressler/fast-containers.git
cd fast-containers
# Configure
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
# Build
cmake --build build
# Run tests
ctest --test-dir build --output-on-failure
| Option | Default | Description |
|---|---|---|
ENABLE_AVX2 | ON (Release), OFF (Debug) | Enable AVX2 SIMD optimizations |
ENABLE_ASAN | OFF | Enable AddressSanitizer |
ENABLE_ALLOCATOR_STATS | OFF | Enable allocator statistics |
ENABLE_LTO | ON | Enable Link-Time Optimization |
ENABLE_NUMA | Auto-detected | Enable NUMA support (requires libnuma) |
Clone with submodules:
git clone --recursive https://github.com/kressler/fast-containers.git
cd fast-containers
One-time development setup:
./setup-dev.sh
This installs pre-commit hooks and configures clang-tidy.
Automatic formatting and checks (via pre-commit hook):
git commit # Automatically formats code and runs clang-tidy
The pre-commit hook will:
Manual formatting:
cmake --build build --target format
Manual static analysis:
cmake --build build --target clang-tidy
# Or manually:
clang-tidy-19 -p cmake-build-clang-tidy include/fast_containers/*.hpp
Requirements:
Bypass hook (when needed):
git commit --no-verify
Make your changes
Build and test:
cmake --build build && ctest --test-dir build
Commit (auto-formatted and checked):
git add .
git commit -m "Your changes"
# Pre-commit hook runs automatically
cmake --build build --target format before submitting PRs.
├── include/
│ └── fast_containers/ # Public header files
│ ├── btree.hpp, btree.ipp
│ ├── dense_map.hpp, dense_map.ipp
│ ├── hugepage_allocator.hpp
│ ├── multi_size_hugepage_allocator.hpp
│ ├── multi_size_hugepage_pool.hpp
│ ├── policy_based_hugepage_allocator.hpp
│ └── hugepage_pool.hpp
├── tests/ # Unit tests (Catch2)
│ ├── test_btree.cpp
│ ├── test_dense_map.cpp
│ ├── test_hugepage_allocator.cpp
│ └── test_policy_based_allocator.cpp
├── src/
│ ├── benchmarks/ # Google Benchmark performance tests
│ │ ├── dense_map_search_benchmark.cpp
│ │ └── hugepage_allocator_benchmark.cpp
│ └── binary/ # Standalone benchmark executables
│ ├── btree_benchmark.cpp
│ └── btree_stress.cpp
├── scripts/
│ └── interleaved_btree_benchmark.py # A/B testing harness
├── results/
│ └── btree_benchmark_results.md # Performance analysis
├── third_party/ # Git submodules
│ ├── catch2/ # Unit testing framework
│ ├── benchmark/ # Google Benchmark
│ ├── histograms/ # Latency histogram library
│ ├── abseil-cpp/ # Comparison baseline
│ ├── lyra/ # Command-line parsing
│ └── unordered_dense/ # Dense hash map
├── hooks/ # Git hooks (install with setup-dev.sh)
│ └── pre-commit # Auto-format and clang-tidy
└── CMakeLists.txt # Build configuration
423 commits
C++
92.7%
Python
3.5%
CMake
2.4%
Shell
1.4%