C++ matching engine for exploring lock-free data structures, cache optimization, and multithreading patterns
- GCC 11+, CMake 3.28+
- Google Benchmark v1.9.5 (fetched automatically via FetchContent)
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildcmake -B build_asan -DCMAKE_BUILD_TYPE=Debug
cmake --build build_asan --target bench_asancd build && ctestsudo cpupower frequency-set -g performance
taskset -c 0 ./build/benchsudo cpupower frequency-set -g performance
taskset -c 0 ./build_asan/bench_asan- CPU: Intel Core i5, 4 cores, 8 threads, 4GHz
- L1/L2/L3: 32KB / 256KB / 8MB
- Compiler: GCC 13, -O3 -march=native
- Benchmark: Google Benchmark v1.9.5
| Benchmark | Time |
|---|---|
| Add | 71 ns |
| Cancel | 60 ns |
| Match | 111 ns |
| MixedWorkload* | 139507 ns |
*MixedWorkload had anomalous results in due to O(n) scan in cancel() - more details in BENCHMARKS.md
| Benchmark | Time |
|---|---|
| Add | 99 ns |
| Cancel | 62 ns |
| Match | 149 ns |
| MixedWorkload | 84 ns |
More info in BENCHMARKS.md