Yep, it's most likely based on Java documentation --
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html#hashCode()

I was also thinking about this when implementing HPPC. Like I said,
unless you know exactly that you have a weird data distribution,
taking the value of the int (long, short, whatever) seems to be just
as good choice as any; in fact, it's a very good hash function since
it has no collisions (is an identity permutation)...

Dawid

On Mon, Jan 25, 2010 at 5:00 PM, Benson Margulies <bimargul...@gmail.com> wrote:
> I figured the commented-out code came from Somewhere for Some Reason.
>
> On Mon, Jan 25, 2010 at 10:46 AM, Sean Owen <sro...@gmail.com> wrote:
>> Dumb question, what would be better?
>>
>> On Jan 25, 2010 3:24 PM, "Dawid Weiss" <dawid.we...@gmail.com> wrote:
>>
>> It's consistent with standard Java library. I guess it does not matter
>> much, unless you have a really weird distribution of the input values.
>>
>> D.
>>
>> On Mon, Jan 25, 2010 at 4:13 PM, Benson Margulies <bimargul...@gmail.com>
>> wrote: >  Why do you thin...
>>
>

Reply via email to