• 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: NSMapTable with C strings as keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMapTable with C strings as keys


  • Subject: Re: NSMapTable with C strings as keys
  • From: Oleg Krupnov <email@hidden>
  • Date: Tue, 28 May 2013 21:45:17 +0300

> If you're going to do that, why bother with an NSMapTable at all? Just store your pointers in a C array.

The string pointers can be different, but they can contain identical
string keys, resulting in identical values. I wanted to find values by
in a more efficient way than dumb array iteration, say, like binary
tree search which is probably used in NSDictionary or NSMapTable.

> It's not useful to pursue this line of thinking without benchmarks.

Now I guess you're right. I just didn't know it was going to be that
complicated. I thought it was pure benefit and cheap. I am reverting
to using NSDictionary.
_______________________________________________

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

References: 
 >NSMapTable with C strings as keys (From: Oleg Krupnov <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Jens Alfke <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Oleg Krupnov <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Jean-Daniel Dupas <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Oleg Krupnov <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: What, exactly constitutes a mutable action on an instance?
  • Next by Date: NSSlider, NSStepper, and NSTextfield with Bindings: how to display initial value?
  • Previous by thread: Re: NSMapTable with C strings as keys
  • Next by thread: Re: NSMapTable with C strings as keys
  • Index(es):
    • Date
    • Thread