• 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: Collection classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Collection classes


  • Subject: Re: Collection classes
  • From: Kyle Moffett <email@hidden>
  • Date: Fri, 9 Jan 2004 00:00:17 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 08, 2004, at 21:59, Dustin Voss wrote:
Well, my beef is different from Timothy's. I don't like that you don't know the performance characteristics of the classes. I have heard that NSArray changes between a traditional array and a linked list as the size increases. For all I know, it eventually turns into a skip list. That's cool, but if I care about performance -- even gross performance -- I need to know whether something is O(n), O(1), or whatever.

IMHO, the NSArray, NSSet, and NSDictionary classes are not exactly designed for high performance. They are designed to be really easy to use and really practical. They contain the ability to do most of what you want, even if it's not as efficient as you might think. If you really want a set with a specific set of performance characteristics, I suggest that you use either STL or raw C arrays or a homegrown solution. OTOH, in most cases, that little bit of performance doesn't really matter. If you run into a specific performance problem *then* you can try to solve it, but you should at least prototype it with the "less efficient" Foundation classes beforehand, to make sure that it really does need more speed.

Cheers,
Kyle Moffett

- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a16 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP? t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
- ------END GEEK CODE BLOCK------


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQE//jVhag7LSGnFq10RAjPeAJ9EbQwiX0FmSNN+dtlGSMGRS+fwoQCfd3Ot
/Keq069BUkxyQ4u+IUYrhHo=
=bWv3
-----END PGP SIGNATURE-----
_______________________________________________
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.

  • Follow-Ups:
    • Re: Collection classes
      • From: Allan Odgaard <email@hidden>
References: 
 >Collection classes (From: T Reaves <email@hidden>)
 >Re: Collection classes (From: Todd Blanchard <email@hidden>)
 >Re: Collection classes (From: Dustin Voss <email@hidden>)

  • Prev by Date: Re: Online Cocoa Developer Documentation Updated
  • Next by Date: Re: Online Cocoa Developer Documentation Updated
  • Previous by thread: Re: Collection classes
  • Next by thread: Re: Collection classes
  • Index(es):
    • Date
    • Thread