Re: Hash value for NSArray
Re: Hash value for NSArray
- Subject: Re: Hash value for NSArray
- From: Ondra Cada <email@hidden>
- Date: Tue, 18 Dec 2001 16:04:34 +0100
Gerard,
>
>>>>> Gerard Iglesias (GI) wrote at Mon, 17 Dec 2001 23:53:25 +0100:
GI> I am wondering why the hash value of an array is the number of elements
GI> of the array?
GI>
GI> I am manipulating small array and it seems better for me to their
GI> description as key for dictionary.
Try to search archives -- we discussed this very thing at some length few
months ago, IIRC.
Myself, I use a very simple category which just XORs hashes of all the
objects in array; that works quite well, you just have to beware long (and/or
deep) arrays.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc