0Pricing
C++ Academy · Lesson

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 report

All lessons in this course

  1. Cache-Friendly Data Layouts
  2. Branch Prediction and Hot Loops
  3. Profiling with perf vtune and Sanitizers
  4. Micro-benchmarking with Google Benchmark
← Back to C++ Academy