• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: BOOL array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BOOL array


  • Subject: Re: BOOL array
  • From: Joel Norvell <email@hidden>
  • Date: Tue, 9 Sep 2008 23:51:20 -0700 (PDT)

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

  • Follow-Ups:
    • Re: BOOL array
      • From: Todd Blanchard <email@hidden>
  • Prev by Date: Re: BOOL array
  • Next by Date: NSInvocation
  • Previous by thread: Re: BOOL array
  • Next by thread: Re: BOOL array
  • Index(es):
    • Date
    • Thread