Re: CGPoint wrapper?
Re: CGPoint wrapper?
- Subject: Re: CGPoint wrapper?
- From: "Sherm Pendley" <email@hidden>
- Date: Thu, 23 Oct 2008 15:12:39 -0400
On Thu, Oct 23, 2008 at 2:49 PM, DKJ <email@hidden> wrote:
> On 23 Oct, 2008, at 11:26, Finlay Dobbie wrote:
>
>> I'm surprised nobody else has picked up on this - how is enumerating
>> an NSArray going to be faster than enumerating a C array?
>>
>
> I was referring to this:
>
> for( TheClass *obj in TheArray ) {}
>
> as fast enumeration.
That's faster (and simpler) to *write*, but it performs no better than
enumerating a C array. It is, in fact, implemented by sending
-countByEnumeratingWithState:objects:count: to the array, then enumerating
over the C array that's returned by reference from that method.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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