operateAnnihilate uses plain [object method] calls. Fast operateAnnihilateFast is the one using function pointers. operateAnnihilateFastest is the new stuff :) The results were:
Starting operateAnnhilate... Stopped operateAnnhilate 8891ms elapsed_ Starting operateAnnihilateFast... Stopped operateAnnihilateFast 9717ms elapsed_ Starting operateAnnihilateFastest... Stopped operateAnnihilateFastest 6456ms elapsed_Oops! Plain message sending is faster now. This has me stumped.
So I went over it with otool. To my pleasant surprise I noticed that with XCode 1.5 and the newest gcc installed, the dummy methods are indeed compiled to blr and blr only. Most optimal :). The function pointer call sequence itself, though is still quite lacking as one stall could easily be avoided.
At first I thought that maybe Apple took the suggestion and used function pointers itself, somehow more optimally... They don't.
Then I figured they might have implemented some of the Tiger techniques already... They haven't.
Then I traced through both codes with the debugger. Still the function pointer technique is about six instructions shorter...
Smells like a cache problem...