The benchmark sandbox has the following C++ libraries pre-installed. You can use any of them in your solution.
| Library | Version | Key Headers |
|---|---|---|
| Boost | 1.83 |
<boost/intrusive/list.hpp><boost/intrusive/set.hpp><boost/container/flat_map.hpp><boost/container/flat_set.hpp>
|
| Abseil | 20220623 |
<absl/container/flat_hash_map.h><absl/container/flat_hash_set.h><absl/container/node_hash_map.h><absl/container/btree_map.h>
|
| Intel TBB | 2021.11 |
<tbb/scalable_allocator.h><tbb/cache_aligned_allocator.h>
|
| Library | Version | Usage |
|---|---|---|
| jemalloc | 5.3 |
#include <jemalloc/jemalloc.h>Use je_malloc/je_free directly, or override operator new/delete
|
| tcmalloc | 2.15 |
#include <gperftools/tcmalloc.h>Use tc_malloc/tc_free directly, or override operator new/delete
|
Boost headers and Abseil are automatically linked. For jemalloc, tcmalloc, or other libraries, add a solution/libraries.cmake file to your solution directory:
# solution/libraries.cmake
target_link_libraries(benchmark jemalloc)
These header-only libraries are pre-installed in the sandbox. No linking required.
| Library | Version | Key Headers |
|---|---|---|
| Tessil robin-map | 1.2.1 |
<tsl/robin_map.h><tsl/robin_set.h>
|
| parallel-hashmap | 1.3.12 |
<parallel_hashmap/phmap.h><parallel_hashmap/btree.h>
|
| plf::colony | 7.x | <plf_colony.h> |
You can also drop any other header-only library directly into your solution/ directory.
To build locally with the same libraries available in the sandbox, install them on your machine:
sudo apt install libboost-dev libabsl-dev libtbb-dev libjemalloc-dev \
libgoogle-perftools-dev robin-map-dev libparallel-hashmap-dev libplf-colony-dev
brew install boost abseil tbb jemalloc gperftools
# robin-map, parallel-hashmap, plf_colony: install from source or use vcpkg
sudo pacman -S boost abseil-cpp tbb jemalloc gperftools
# robin-map, parallel-hashmap, plf_colony: available via AUR
All libraries are optional — the build will succeed without them. They are only linked if found by CMake.
The benchmark runs on a dedicated x86_64 machine with isolated cores, fixed CPU frequency (no turbo), and IRQs moved off the benchmark cores. The exact CPU model is not disclosed, but here are the ISA features you can rely on:
| SSE | SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 |
| AVX | AVX, AVX2, FMA |
| Bit manipulation | BMI1, BMI2, POPCNT, LZCNT (abm) |
| AES / Crypto | AES-NI, PCLMULQDQ, RDRAND, RDSEED |
| Memory | MOVBE, CLFLUSH, CLFLUSHOPT, prefetch (3dnowprefetch) |
| TSC | RDTSC, RDTSCP, constant_tsc, nonstop_tsc |
| XSAVE | XSAVE, XSAVEOPT, XSAVEC, XGETBV1 |
Not available: AVX-512, AMX, AVX-VNNI. Do not use -march=native locally and expect it to work on the benchmark machine.
mmap(MAP_HUGETLB). Falls back to regular pages if exhausted.-std=c++20, -O2)