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

Re: array performance


  • Subject: Re: array performance
  • From: Michael Tsai <email@hidden>
  • Date: Mon, 16 Jun 2003 22:44:16 -0400

On Monday, June 16, 2003, at 08:52 PM, Michael Tsai wrote:

On Friday, June 13, 2003, at 08:51 PM, Pete Yandell wrote:

Sort a C array of ints using the qsort function: 1.89 seconds
Sort a C array of NSNumbers using the qsort function: 22.08 seconds

Sort an NSMutableArray of NSNumbers using the sortUsingSelector: method: 49.83 seconds
Sort an NSMutableArray of NSNumbers using the sortUsingFunction: method: 21.09 seconds

How about sorting a CFMutableArray of ints using CFArraySortValues?

Pete sent me his test code, and I found that sorting a CFMutableArray of intptr_t is within a factor of 2 of qsorting a C array of ints.

--
Michael Tsai <http://www.c-command.com>
_______________________________________________
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.

References: 
 >Re: array performance (From: Michael Tsai <email@hidden>)

  • Prev by Date: How to warn users in the installer that 10.2 is required?
  • Next by Date: Dividing an array into subgroups?
  • Previous by thread: Re: array performance
  • Next by thread: OT: WWDC
  • Index(es):
    • Date
    • Thread