On 16 Nov 2011, at 11:31 AM, Don Quixote de la Mancha wrote:
> objc_msgSend is slow as Alaskan Molasses compared to a simple C function call.
Cocoa uses Objective-C for I/O and user-interaction libraries, to respond to
events that take place over periods of milliseconds.
For those purposes, I can't weep for calls that take hundreds of nanoseconds
instead of tens. If you need C/C++ speeds, by all means use those languages and
write your ivars directly.
In my experience, obsessing on objc_msgSend for performance optimization is a
fool's errand. Filter out system-library samples (they get reattributed to your
own code). That will tell you where to optimize _your_ code. If that means
factoring message sends out of inner loops, at least you'll know.
— F
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]