In this CppCon talk, Kris Jusiak discusses performance measurement and optimization, emphasizing the importance of reliable measurements in microbenchmarking due to inherent noise. He highlights how CPU performance has shifted from latency to throughput, making nanosecond accuracy crucial. Kris outlines a staged approach to performance analysis, focusing on hardware effects and the necessity of trusting and reproducing measurements. He covers tools like eBPF and Perf for system and application-level analysis, and introduces X-Ray for enabling/disabling profiling with minimal overhead. The talk further delves into microbenchmarking pitfalls such as noise, bias, and hardware effects, advocating for sanity checks, runtime checks, and understanding data distribution through histograms and empirical cumulative distribution functions. Kris also addresses branch prediction, code layout, cache considerations, and the importance of correlating microbenchmark results with production code performance to avoid false optimizations.
Sign in to continue reading, translating and more.
Continue