Hello,
I take a look at the hash function of Unreal Engine 4 on github.
I do not understand a special case for int64 and uint64.
inline uint32 GetTypeHash( const uint64 A )
{
return (uint32)A+((uint32)(A>>32) * 23);
}
inline uint32 GetTypeHash( const int64 A )
{
return (uint32)A+((uint32)(A>>32) * 23);
}
What I do not understand is how and why it's works?
I can't find any algorithm or trick like that on internet, The std for long long and unsigned long run the murmur hash for thoses types.
Can anybody can explain me or redirect me to a link that explain that?
Why adding the low with the high part * 23 is relevant? why 23?
Thank you very much,
Best Regards,