[Mesa-dev] [PATCH 3/3] util: Use 32 bit integer hash function for pointers

2015-03-30 Thread Thomas Helland
It is hard finding a statement or direct quote from Thomas on the licensing of his algorithm. I tried the 6 shift algorithm Bob suggests this morning before work. It seems Thomas' algorithm inlines very nicely, giving the boost. Bob's version probably gives more collisions, as the time spent in the

Re: [Mesa-dev] [PATCH 3/3] util: Use 32 bit integer hash function for pointers

2015-03-29 Thread Jordan Justen
On 2015-03-29 13:28:02, Thomas Helland wrote: > (Forgot to send to list) > > That is indeed an issue. > I found the original article on the wayback machine and it > doesn't state anything particular wrt license. > However, it seems to be used in a LOT of projects. > (javascript, chromium, hiphop-p

Re: [Mesa-dev] [PATCH 3/3] util: Use 32 bit integer hash function for pointers

2015-03-29 Thread Jordan Justen
On 2015-03-29 11:05:40, Thomas Helland wrote: > Since a pointer is basically just an int we can use integer hashing. > This one is taken from https://gist.github.com/badboy/6267743 There doesn't seem to be a license associated with this code, nor is it indicated that it is public domain code. -Jo

Re: [Mesa-dev] [PATCH 3/3] util: Use 32 bit integer hash function for pointers

2015-03-29 Thread Thomas Helland
2015-03-29 20:15 GMT+02:00 Matt Turner : > On Sun, Mar 29, 2015 at 11:05 AM, Thomas Helland > wrote: >> Since a pointer is basically just an int we can use integer hashing. >> This one is taken from https://gist.github.com/badboy/6267743 >> A google search seems to suggest this is a common and goo

Re: [Mesa-dev] [PATCH 3/3] util: Use 32 bit integer hash function for pointers

2015-03-29 Thread Matt Turner
On Sun, Mar 29, 2015 at 11:05 AM, Thomas Helland wrote: > Since a pointer is basically just an int we can use integer hashing. > This one is taken from https://gist.github.com/badboy/6267743 > A google search seems to suggest this is a common and good algorithm. > Since it operates 32 bits at a ti

[Mesa-dev] [PATCH 3/3] util: Use 32 bit integer hash function for pointers

2015-03-29 Thread Thomas Helland
Since a pointer is basically just an int we can use integer hashing. This one is taken from https://gist.github.com/badboy/6267743 A google search seems to suggest this is a common and good algorithm. Since it operates 32 bits at a time it is really effective. assert that we are hashing 32bit align