Re: BOOL array
Re: BOOL array
- Subject: Re: BOOL array
- From: Joel Norvell <email@hidden>
- Date: Tue, 9 Sep 2008 23:40:12 -0700 (PDT)
> On Sep 9, 2008, at 18:43, Quincey Morris wrote:
> > 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?
> Or use NSMutableData objects with 1 byte for each 0 or 1 value. You
> can then get the BOOL values as 'data.bytes [index]', set them with
> 'data.mutableBytes [index] = someBool' and resize the array with
> 'data.length = someLength'. In terms of source code, that's about as
> minimalistic as it gets without being pure C.
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