YouTube09 Jun 2025
32m

WWDC25: Optimize CPU performance with Instruments | Apple

Podcast cover

Apple Developer

In this monologue, Matt, an OS kernel engineer, explains how to optimize code for Apple silicon CPUs using Instruments. He emphasizes the difficulty of predicting software performance due to abstractions and CPU instruction execution. Matt outlines a strategy involving data-driven performance investigations, traditional profiling, Processor Trace for detailed instruction analysis, and the CPU Counters instrument for identifying and addressing CPU bottlenecks. He also advises considering alternative approaches like avoiding unnecessary work before resorting to micro-optimizations, and uses the example of optimizing a binary search algorithm to demonstrate the use of Instruments' CPU Profiler, Processor Trace, and CPU Counters, ultimately achieving a 25-fold performance improvement.

Outlines

Sign in to continue reading, translating and more.

Open full episode in Podwise