Dealing with performance analysis in C and C++
summary
Daily workflow uses perf and VTune to compare compiler builds and finds concrete regressions: a 15% slowdown from lost loop unrolling, a 10% loss when vectorized code turns scalar, and a surprising +48% throughput gain from re-aligning hot basic blocks. Root causes include missing -O3/-march optimizations, code placement and IDQ_UOPS_NOT_DELIVERED stalls, and instruction encoding differences (fused RMW vs load/inc/store). Microbenchmarks with a ubench-style loop confirm which change actually affects cycles.
AI-written summary · about
