• 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: Best Way To Lookup From a Huge Table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Way To Lookup From a Huge Table


  • Subject: Re: Best Way To Lookup From a Huge Table
  • From: Thomas Engelmeier <email@hidden>
  • Date: Sat, 22 Mar 2008 19:46:36 +0100


On 21.03.2008, at 21:51, John Stiles wrote:

std::map actually does more than NSDictionary—it sorts its entries instead of keeping them in random order. Also, it copies its keys instead of just keeping a reference to them, which is also more work— it would be a much fairer test if you used std::string* pointers for your keys and values instead of std::string objects, but it'd also be a little more work since you'd need a custom comparator and you'd need to consider memory management (which boost smart pointers apparently can manage pretty well).

No need to pull in the whole boost overhead for smart(er) pointers as of gcc 4.0.


#include <tr1/memory>
using std::tr1::shared_ptr;

And for the presorting time - TR1 includes also an unordered_map and unordered_set.

Regards,
	Tom_E

_______________________________________________

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: 
 >Re: Best Way To Lookup From a Huge Table (From: Scott Ribe <email@hidden>)
 >Re: Best Way To Lookup From a Huge Table (From: "E. Wing" <email@hidden>)
 >Re: Best Way To Lookup From a Huge Table (From: "Michael Ash" <email@hidden>)
 >Re: Best Way To Lookup From a Huge Table (From: John Stiles <email@hidden>)
 >Re: Best Way To Lookup From a Huge Table (From: "Michael Ash" <email@hidden>)
 >Re: Best Way To Lookup From a Huge Table (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Changing properties inside a relationship entity
  • Next by Date: Re: base64 NSData to NSString
  • Previous by thread: Re: Best Way To Lookup From a Huge Table
  • Next by thread: Re: Best Way To Lookup From a Huge Table
  • Index(es):
    • Date
    • Thread