Re: ObjC in time-critical parts of the code
Re: ObjC in time-critical parts of the code
- Subject: Re: ObjC in time-critical parts of the code
- From: Shawn Erickson <email@hidden>
- Date: Fri, 16 Jan 2009 14:36:21 -0800
On Fri, Jan 16, 2009 at 2:26 PM, Justin Carlson
<email@hidden> wrote:
>
> Sorry if I come across as the devil's advocate on this one - I think there
> should be another voice stating that objc use can slow a program.
Note no one that responded to Jens is stating that the Objective-C way
of doing message dispatching cannot cause performance critical
pathways to be "hotter" then desired compared to direct function
calls, C++ vtable dispatching, etc. The point has been that just don't
assume that is the source of a problem. Properly analyze what is going
on and then make adjustments.
Also what Jens posted for the timings of message sends was WAY off
from the reality.
Anyway note using things like IMP caching in performance problem areas
will gain you speeds often better then you would via C++ vtable
dispatch. So you don't have to drop the use Objective-C because of
message send over head (in most real world situations).
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden