On Tuesday, February 5, 2019 at 12:29:32 AM UTC+3, Michael Jones wrote:

> I recently did just this in an effort (successful!) to make a well-known 
> simple hash function be its best with minor single CPU cycle changes. 
>

yes I am told 15 is not the best shift amount, how about this?
x = x<<27 ^ x>>37

the upper limit of length sum could be 9, because hashes of 9-byte valid 
utf8 strings are less than 255^9, on average ~247 per uin64 value, so one 
such uint64 value most likely will be zero which is the hash of empty 
string. so you get a length sum of 9. can you bring it down? or can we 
"design" a hash to guarantee 9?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to