• 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: Faking large arrays in bindings to satisfy sparse data...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faking large arrays in bindings to satisfy sparse data...


  • Subject: Re: Faking large arrays in bindings to satisfy sparse data...
  • From: j o a r <email@hidden>
  • Date: Sun, 20 Mar 2005 11:19:59 +0100


On 2005-03-20, at 10.57, Marco Scheurer wrote:

I thought about an NSDictionary, but this has speed disadvantages as each key must be compared in unicode
when all I need is to compare numerals (positions in the sparse array)....

Not necessarily: you can use NSNumbers as keys in an NSDictionary.

Unfortunately there is a weird performance regression with using integer values wrapped in NSNumber as dictionary keys on Panther (compared with Jaguar). It might, or might not, be an issue for you - depending on how you plan to use this collection.


You can use a CFDictionary with integer keys, saving you the overhead of having to wrap them in NSNumber instances. But IIRC that doesn't perform quite as well as you might expect / want either.

I don't have a really good answer for you, but I think that regardless of the underlying implementation you eventually choose for your custom collection class it's a really good idea to make a set of functional tests, and performance tests, to be able to monitor how it works.

j o a r

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Faking large arrays in bindings to satisfy sparse data...
      • From: Marco Scheurer <email@hidden>
References: 
 >Faking large arrays in bindings to satisfy sparse data... (From: アンドレ(Andre) <email@hidden>)
 >Re: Faking large arrays in bindings to satisfy sparse data... (From: Marco Scheurer <email@hidden>)

  • Prev by Date: Priting Multiple View -(Sorry to ask but i m :-(( )
  • Next by Date: Start application by dragging a file on it
  • Previous by thread: Re: Faking large arrays in bindings to satisfy sparse data...
  • Next by thread: Re: Faking large arrays in bindings to satisfy sparse data...
  • Index(es):
    • Date
    • Thread