• 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: NSArray - waste of time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray - waste of time?


  • Subject: Re: NSArray - waste of time?
  • From: Philippe Mougin <email@hidden>
  • Date: Thu, 26 Apr 2007 23:51:24 +0200



Le 26 avr. 07 à 23:36, John Stiles a écrit :

This is a bit confusing to me--the implementation of NSArray is inside the OS, right? So what do you mean by this? Do you have a custom subclass or something?

Yes. NSArray is semi-abstract, and is consequently always used through a concrete subclass. Cocoa provides default implementations (the most common is NSCFArray these days) but you can as well use your own concrete subclass. This is what we do in F-Script.


Philippe Mougin


Sent: Thu 4/26/2007 2:33 PM
To: email@hidden
Subject: Re: NSArray - waste of time?
 > There is also the footprint to consider, surely?
 > A C-style array is likely to be much smaller than
 > an NSArray of objects, particularly in the case of
 > primitive data types such as floats vs NSNumber objects.

It depends how the NSArrays you deal with are implemented (remember
that NSArray is a class cluster -- in other words, a semi-abstract
class). For instance, in F-Script we make extensive usage of NSArrays
(in particular arrays of NSNumbers), but we do so using an
implementation that transparently make them as small and as fast as C-
style arrays, in most cases.

Philippe Mougin

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Re: NSArray - waste of time? (From: Philippe Mougin <email@hidden>)
 >RE: NSArray - waste of time? (From: "John Stiles" <email@hidden>)

  • Prev by Date: Re: PDFview and Password protected PDFs
  • Next by Date: How to change scroll view size so it can scroll
  • Previous by thread: RE: NSArray - waste of time?
  • Next by thread: Fwd: NSArray - waste of time?
  • Index(es):
    • Date
    • Thread