Approaches To Performance

The key to keeping on top of your performance is to use profiling tools. Profile early, and profile often. Catch performance issues early in your development so you don’t build a lot of code around an inefficient core. If you use Instruments, Shark, or other performance tools regularly, you can see possible performance issues on the horizon before they come close and bite you.

Be sure to profile with each new revision of the OS and on new hardware as it comes out. As Apple changes Mac OS X under the hood, things that were optimal may now be suboptimal and vice-versa. Hardware changes can change the game performance-wise. Consider look-up tables, which are a common way to avoid doing calculation. On PowerPC G4 and older ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide 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.