Hi,

> The simplest hash is the concatenation of the string representation of all
> the properties you are currently comparing, assuming that no property will
> have the value of empty string "".  I believe you can always test for ""
> and swap for something else, even a simple space " ".  If there are
> numeric properties you might want to add a delimiter so that "11" + "1" is
> different from "1" + "11”.

You may need to be a little careful here as calculation of hashes (and string 
manipulation in general) can be very expensive in terms of garbage collection. 
Your milage may vary but in a similar situation I had a while back string 
hashes made the process slower and I needed up needing to go with numeric 
hashes. Also looking up numeric index in array or numeric properties in objects 
is a lot faster than looking up string properties in objects.

Thanks,
Justin

Reply via email to