Available Libraries

The benchmark sandbox has the following C++ libraries pre-installed. You can use any of them in your solution.

Containers & Data Structures

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>

Allocators

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

Linking Non-Header-Only Libraries

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)

Header-Only Libraries (Pre-installed)

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.

Local Development Setup

To build locally with the same libraries available in the sandbox, install them on your machine:

Ubuntu / Debian
sudo apt install libboost-dev libabsl-dev libtbb-dev libjemalloc-dev \
    libgoogle-perftools-dev robin-map-dev libparallel-hashmap-dev libplf-colony-dev
macOS (Homebrew)
brew install boost abseil tbb jemalloc gperftools
# robin-map, parallel-hashmap, plf_colony: install from source or use vcpkg
Arch Linux
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.

Benchmark Machine

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:

Instruction Set Extensions
SSESSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2
AVXAVX, AVX2, FMA
Bit manipulationBMI1, BMI2, POPCNT, LZCNT (abm)
AES / CryptoAES-NI, PCLMULQDQ, RDRAND, RDSEED
MemoryMOVBE, CLFLUSH, CLFLUSHOPT, prefetch (3dnowprefetch)
TSCRDTSC, RDTSCP, constant_tsc, nonstop_tsc
XSAVEXSAVE, 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.

System Features
  • Hugepages — ~1 GB of 2MB hugepages available via mmap(MAP_HUGETLB). Falls back to regular pages if exhausted.
  • CPU isolation — benchmark cores isolated from OS scheduler, no HT sibling, no IRQs
  • Fixed frequency — turbo boost disabled, performance governor
  • THP disabled — transparent hugepages off (no surprise page faults)
  • C++ Standard — C++20 (-std=c++20, -O2)
  • Compiler — GCC 13.3.0 (g++) on Ubuntu 24.04