Mulle kybernetiK - Tech Info: v0.A
Optimizing Objective-C code
This article series explores ways how to make your Objective-C code run faster. The series covers exclusively Objective-C and Foundation specifica. Optimizing code in general is not part of the agenda.
Copyright (c) 2000-2004 Mulle kybernetiK - text by Nat!


Come and visit the Mulle kybernetiK Optimization Forum.
Discuss the articles or post your performance tips and problems.


The Optimizing Objective C Series

1. Profiling C and Objective-C code with Sampler.app
This is fairly obsolete now. Instead use the Shark documentation that has become very good since CHUD version 3.5
2. Allocation Basics & Foundation
Covers the class runtime system and the way Foundation and those inheriting from Foundation classes create objects.
3.
Method and function call innards
This article covers function calls, method calls, shared library calls and inlining.
3.1. Giving [] a boost
In this article function points are used for faster method calls
3.2. IMP Caching Deluxe
Use of a local IMP cache for much faster method calls.
4.
Optimizing Foundation Classes
Through the use of specialized subclasses Foundation code can often be otimized by a large margin.
4.1. Atomic Operations
Use assembler code for fastest possible locking. This can be well worth it, if you really want to squeeze out some performance.
4.1.1. Concurrent Programming, a quick refresher
Just a little essay, why locks are necessary even for very simple operations, when resources are shared between threads.
5. Optimized Object Generation
Object Allocation. Explorations on the final frontier.
6. Optimized Hashing in Mac OS X
Examines current Foundation hashes and their pitfalls. Explains what a good hash is.
7 A faster objc_msgSend
Commented disassembly of the most interesting part of objc_msgSend and a few suggestions, how it could be done faster.