Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You are probably saying to yourself: “All this look-up business has to be much slower than a plain function call.” It is. The runtime code goes to great lengths to make the method look up as fast as possible, but it is still slower than a C function call. However, this usually doesn’t make much practical difference. In almost every case, the time required to execute the body of a method will dwarf the time required to dispatch the message. There are rare cases where the dispatch overhead could be an issue. These are usually cases where you are doing something a huge number of times in a tight loop. If you find one of these cases, you can use the NSObject method methodForSelector: to get a pointer to the C function that implements the method:
IMP anIMP = [aShape methodForSelector: @selector( draw )];