O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

22Grand Central Dispatch

As mentioned in Chapter 10: Performance Tuning, we have reached the end of free performance as the transistors of new processors are being put into more and more cores rather than drastically speeding up existing cores.

Multi-threaded programming can be hard. You have race conditions, which can be fixed by locking, but it can be difficult to get the proper granularity of locking to prevent all of your threads from serializing on one code path. Finding the right locking granularity is hard. Make your locks too big, and they force serialization. Make them too small, and you drown in locking and unlocking overhead. Parallel algorithms also are more difficult to understand than serial algorithms, or at least they are not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required