Re: Fast dictionary with integer keys?
Re: Fast dictionary with integer keys?
- Subject: Re: Fast dictionary with integer keys?
- From: Clark Cox <email@hidden>
- Date: Sun, 15 Mar 2009 20:34:49 -0700
On Sun, Mar 15, 2009 at 6:45 PM, Tommy Nordgren
<email@hidden> wrote:
>
> On Mar 16, 2009, at 1:35 AM, Joseph Kelly wrote:
>
>>
>> On Mar 15, 2009, at 12:18 PM, Tommy Nordgren wrote:
>>
>>> You can write your implementation file in Objective C++ , and use
>>> std::map<int,id>
>>>
>>
> You can also use std::hashmap<int,id> . It uses a hash table instead
> of a balanced binary tree.
> This is however dependent of a good hash function.
If your keys are integers, then you've got the best hash function
possible: the identity function :)
--
Clark S. Cox III
email@hidden
_______________________________________________
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