• 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
Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?


  • Subject: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
  • From: Stanislas Krásnaya <email@hidden>
  • Date: Wed, 17 Dec 2008 21:04:13 +0100

Hello everyone!

I've got a basic question. I'm sure this is a very vast debate, since I've found several answers on the subject, but I'm not satisfied.


I've read that, since we're programming in Objective-C, it's more elegant and reliable to use an NSArray stuffed with NSNumber instead of a classic C array. But what I want to do, it's performing classic calculation, like mean value, variance... etc, on floating point numbers. Typically around 1000 of them.


I know that our computers are fast now, but this doesn't mean that we have to not take care of optimization.


So, since NSArray is designed to store all kinds of NSObject's, and mine will just store some NSNumber's, wouldn't it be a bit stupid to use it?


Thanks in advance.


Stanislas _______________________________________________

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: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
      • From: Rich Collyer <email@hidden>
    • Re: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
      • From: "I. Savant" <email@hidden>
    • Re: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
      • From: Quincey Morris <email@hidden>
    • Re: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
      • From: Boyd Collier <email@hidden>
    • Re: Performance of calculation on float point numbers in a array € NSNumber in NSArray, or classic C array?
      • From: Scott Ribe <email@hidden>
    • Re: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
      • From: Rob Rix <email@hidden>
  • Prev by Date: Re: Using a NSCollectionView in a table cell.
  • Next by Date: Receiving controlTextDidChange: from change in bound value?
  • Previous by thread: [Q] What type the Final Cut Pro expect when a file is drag&dropped to its project?
  • Next by thread: Re: Performance of calculation on float point numbers in a array • NSNumber in NSArray, or classic C array?
  • Index(es):
    • Date
    • Thread