Profiling with perf vtune and Sanitizers
Profile programs with perf and Intel VTune and catch bugs with AddressSanitizer.
Why Profile?
Intuition about performance is usually wrong. Profile to find real bottlenecks — then optimize.
Linux: perf
perf is a low-overhead sampling profiler that ships with Linux. Run it on any binary built with debug info.
g++ -O2 -g main.cpp -o main
perf record ./main
perf reportAll lessons in this course
- Cache-Friendly Data Layouts
- Branch Prediction and Hot Loops
- Profiling with perf vtune and Sanitizers
- Micro-benchmarking with Google Benchmark