Re: Fast dictionary with integer keys?
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