What is the best hash functions for millions of String keys? I have a situation where there are a million Keys of type String and I want to use the Symbol table to store the key and the value.

The problem that the retrieval process is too slow and I want to improve the retrieval. I wonder if there is a good hash function to help me with this task.

I am using Separate Channing for resolving the collision

the current hash function

hash = 0
for i = 0 : strlen
    hash = hash * 31 + getChar(strlen, i)


So My question: Is there a better hash function to minimize the collision between the keys?
hash = (hash + getChar(strlen, i)) * 123456791