2. CPU: Measurement and Tools

Measurement plays an absolutely crucial part in performance optimization. We cannot control what we cannot measure, and controlling performance parameters—hopefully by improving them—is the goal of the exercise. Without measuring to control our results, we cannot be sure that what we are doing actually improves the situation, rather than making it worse.

Another important aspect is analysis; after all, it helps tremendously to have a good idea what may be the problem before we try to fix it. However, unlike verification, measurement for analysis has just a helper function, being one of the sources for forming our hypothesis about the nature of the problem. When a problem is obvious, it can be expedient to skip measurement ...

Get iOS and macOS™ Performance Tuning: Cocoa®, Cocoa Touch®, Objective-C®, and Swift™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.