Get up and running with C++ High Performance Guide in under 5 minutes.
Before you begin, ensure you have:
- Compiler: GCC 11+, Clang 14+, or MSVC 2022+
- CMake: 3.20 or higher
- Git: For cloning the repository
Verify your compiler:
g++ --version # Should show 11.0 or higher
clang++ --version # Should show 14.0 or highergit clone https://github.com/LessUp/cpp-high-performance-guide.git
cd cpp-high-performance-guideUse CMake presets for reproducible builds:
# Release build (optimized for performance)
cmake --preset=release
# Or debug build (for development)
cmake --preset=debugcmake --build build/releasectest --preset=release./build/release/examples/02-memory-cache/aos_soa_bench| Preset | Description | Use Case |
|---|---|---|
release |
-O3, march=native | Performance measurements |
debug |
-O0, -g | Development and debugging |
relwithdebinfo |
-O2, -g | Profiling with symbols |
asan |
AddressSanitizer | Memory error detection |
tsan |
ThreadSanitizer | Race condition detection |
ubsan |
UndefinedBehaviorSanitizer | UB detection |
coverage |
gcov | Code coverage analysis |
- Learning Path - Follow the structured 6-week curriculum
- First Example - Explore Modern CMake
- Profiling Guide - Learn to measure performance
Install a C++20 compatible compiler:
# Ubuntu/Debian
sudo apt-get install build-essential g++-11
# Fedora
sudo dnf install gcc-c++
# macOS
brew install gccCheck network connection or use system packages:
# Ubuntu/Debian
sudo apt-get install libbenchmark-dev libgtest-devSee Troubleshooting Guide for more issues.