Re: loop efficiency & messages
Re: loop efficiency & messages
- Subject: Re: loop efficiency & messages
- From: Florent Pillet <email@hidden>
- Date: Thu, 24 Mar 2005 09:14:04 +0100
Ondra and John most certainly already know this site, but for others
who want to understand the performance cost of message passing, and for
some very interesting reading about the inside of the Objective-C
runtime (and Cocoa in general), I highly recommend reading Mulle
Kybernetik's "Optimizing Objective-C code" series:
http://www.mulle-kybernetik.com/artikel/Optimization/
It's fun, deeply technical and extremely interesting if you're into
this.
Florent
On 22 mars 05, at 23:21, John Stiles wrote:
Maybe you don't.
To say that nobody ever needed to optimize away the cost of
objc_msgSend is absurd. If you have a loop that Shark shows as taking
a large % of your CPU time, and the loop body isn't doing much work
per iteration, then making this kind of optimization could be very
worthwhile.
There are a lot of documents that explicitly discuss ways to lower the
cost of objc_msgSend; I'm not going to go look them up, but it's stuff
like selector caching, etc. I assume these guys wouldn't have gone to
the effort of figuring out these techniques just as an exercise,
because they were bored. Obviously the message dispatch cost mattered
to them at the time.
--
Florent Pillet http://www.florentpillet.com
Freelance software developer/consultant - Palm OS & Mac OS X
ICQ: 117292463 Skype: callto://florent.pillet
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden