Re: Cocoa/Objective-C's Relative Performance
Re: Cocoa/Objective-C's Relative Performance
- Subject: Re: Cocoa/Objective-C's Relative Performance
- From: Philippe Mougin <email@hidden>
- Date: Thu, 13 Jan 2005 00:33:18 +0100
Ivan S. Kourtev wrote:
> Does anyone know of any comparative study or [even better] published
> runtime complexities for the Cocoa data structures? I wish Apple had
> provided these numbers but, alas, I have not been able to find them.
A look at the source code for the Cocoa containers should help you
determine this. The code is available as part of the open source
distribution of CoreFoundation, which is part of Darwin.
> Perhaps I am missing the point and these Cocoa data structures are
> only optimal for use with GUI widgets (of which there are never
> millions). I am starting to think that for maximum performance (I am
> talking about data sets with hundreds of millions of elements) one
> would always need a custom non-Cocoa (and not even Objectivee-C
> because of the objc_msgsend() overhead) data structures.
If the default implementation provided by Cocoa is too slow and/or use
too much memory you might be able to provide your own implementation,
specifically optimized for your application, and plug it into the Cocoa
container framework. Cocoa containers are specifically designed (as
"class clusters") to let you plug your own optimized implementation if
needed, with minimal effort. I had to do this kind of development and
it was possible, in my particular context (which involves very large
and fast arrays of numbers and booleans and an array programming
model), to get NSMutableArrays with performance and memory footprint
equivalent to those of raw C arrays with primitive types. Depending on
your context, you might be able to get the same kind of performance.
Best,
Philippe mougin
http://www.fscript.org
_______________________________________________
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