Re: Collection classes
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.