Re: NSMutableArray performance
Re: NSMutableArray performance
- Subject: Re: NSMutableArray performance
- From: "Brian E. Howard" <email@hidden>
- Date: Mon, 7 Oct 2002 18:34:50 -0400
You might try using NSArray instead of mutable if you only need 1--3
items in the each array. Nil out any unused slots. NSArray is much
faster than NSMutableArray as I remember.
On Monday, October 7, 2002, at 05:21 PM, kubernan wrote:
Hello,
I decided to rewrite my old C++ application in full Objective-C.
This application used extensively arrays of double values and makes
many computations.
I decided to replace all my arrays by NSMutableArray and all becomes
very slow.
The sequence execution between the C++ and Objective-C is the same
(executing the code in debug mode, step by step), so i can
think there is no dead code.
The mutable arrays can contain between 1 and 3 double value objects
only but
my programm makes lots of such thing :
double aValueToCompute = [[myArray objectAtIndex:index] doubleValue]
* [[theSecondArray objectAtIndex:index] doubleValue];
Is there somewhere a topic about NSMutableArray performances ?
Should i stay with simple C array ?
Thx.
K.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.