• 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: Fast dictionary with integer keys?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fast dictionary with integer keys?


  • Subject: Re: Fast dictionary with integer keys?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 16 Mar 2009 09:37:20 +0100


Le 16 mars 09 à 04:42, Chris Suter a écrit :

Hi Clark,

If your keys are integers, then you've got the best hash function
possible: the identity function :)

I know what you mean, but that's not strictly speaking true. If your integers were congruent modulo your hash table size, it wouldn't be a very good hash function.

Regards,

Chris

That's why a good hash table uses primary numbers as table size (like CFDictionary does).




_______________________________________________

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: Fast dictionary with integer keys?
      • From: Graham Cox <email@hidden>
References: 
 >Fast dictionary with integer keys? (From: Oleg Krupnov <email@hidden>)
 >Re: Fast dictionary with integer keys? (From: Tommy Nordgren <email@hidden>)
 >Re: Fast dictionary with integer keys? (From: Joseph Kelly <email@hidden>)
 >Re: Fast dictionary with integer keys? (From: Tommy Nordgren <email@hidden>)
 >Re: Fast dictionary with integer keys? (From: Clark Cox <email@hidden>)
 >Re: Fast dictionary with integer keys? (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: Automatically replacing part of text in a text label
  • Next by Date: Re: Messages between Threads
  • Previous by thread: Re: Fast dictionary with integer keys?
  • Next by thread: Re: Fast dictionary with integer keys?
  • Index(es):
    • Date
    • Thread