Re: BOOL array
Re: BOOL array
- Subject: Re: BOOL array
- From: Todd Blanchard <email@hidden>
- Date: Wed, 10 Sep 2008 00:48:37 -0700
Well, if I read it right, he's using the NSString as a very expensive
bit vector - only storing 0's and 1's.
If instead of storing a '1' at position n he sticks n into the
NSMutableIndexSet, it amounts to the same thing.
He can keep an array of NSMutableIndexSets instead of an array of
NSStrings.
On Sep 9, 2008, at 11:51 PM, Joel Norvell wrote:
I'm resending this to correct an egregious attribution error in my
previous post. My comment remains the same.
On Sep 9, 2008, at 03:24, Alex Reynolds wrote:
I am currently putting 320 to 480 character long NSString *
instances into an NSMutableArray. The characters are 0 or 1.
I guess I could use an int array, but I'm looking to speed up my app
and reduce storage. Is it possible to create a BOOL array that can
be put into an NSMutableArray?
On Sep 10, 2008, at 02:32, Todd Blanchard wrote:
You might consider using a NSMutableIndexSet since your problem
basically boils down to storing membership in a set for each of a
ranch of numbers. NSIndexSet is what things like NSTable use to
track
selected rows. I would think it would be hard to beat that without
going to a raw C bitmap implementation. It will be MUCH better than
what you have now.
The values in an NSMutableIndexSet are always sorted, so the order
in which they are added is not preserved. Wouldn't that defeat the
purpose of the OP's data structure?
_______________________________________________
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
_______________________________________________
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