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: Scott Ribe <email@hidden>
- Date: Sat, 17 Jan 2009 09:02:49 -0700
- Thread-topic: ObjC in time-critical parts of the code
> Furthermore, vtables are not mandatory in all cases/calls. A
> good optimizer (or properly written class) can overcome such
> dependencies in several cases - optimization is far easier to
> accomplish outside the constraints of the ObjC runtime. So you get
> faster messaging, and more optimization control from C++ objects.
In addition, in many cases where Objective-C would have one or more method
dispatches in innermost performance-critical regions, with C++/STL you will
have NO FUNCTION CALL AT ALL, but rather direct pointer-based data access or
inlined code. In my own testing, I've found that to be the biggest
difference, because Objective-C method dispatch is in fact pretty efficient
method dispatch.
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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