• 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: Jens Alfke <email@hidden>
  • Date: Thu, 30 May 2013 08:46:32 -0700

On May 29, 2013, at 11:35 PM, Eric Wing <email@hidden> wrote:

> In my introduction, I was fairly adamant that time lost to impedance
> mis-match should be measured because my interest was real performance
> in using these libraries for projects based in C. That conversion time
> is non-trivial.

If you’re coding in C, I don’t think it makes sense to consider other languages (except maybe C++) just for their hashtable implementations! There’s inevitably going to be impedance mismatch: not just with data conversion but also memory management, since most of the languages you tested are garbage collected. That means you now have two heaps (a GC heap embedded inside your malloc heap) and extra memory usage and cost for running the GC. Not to mention the bloat on your app’s code size.

Surely there are enough reusable C-based hashtable libraries that you don’t need to embed a whole Lua or Python interpreter just for that purpose. (And if not, it’s really easy to write one.)

—Jens
_______________________________________________

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: NSMapTable with C strings as keys
      • From: Eric Wing <email@hidden>
References: 
 >NSMapTable with C strings as keys (From: Oleg Krupnov <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Eric Wing <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Jens Alfke <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Eric Wing <email@hidden>)

  • Prev by Date: Re: NSMapTable with C strings as keys
  • Next by Date: Re: NSMapTable with C strings as keys
  • Previous by thread: Re: NSMapTable with C strings as keys
  • Next by thread: Re: NSMapTable with C strings as keys
  • Index(es):
    • Date
    • Thread