I have a program which uses a hashtable and chaining to save a maximum of 100.000 strings. Each string has a maximum length of 20 and is made of a mix of (a-z) and (1-9) and is unique.
To save it into the hashtable I convert the strings to a number by adding up the ASCII values of their characters. This means the highest number possible is 2440 (20 times z).
I am having trouble thinking of the best hash function for this (algorithm efficiency wise). I have searched on Google and I haven't found a lot of detailed information about how to find the best hash function.
I have tried using hash % m (in which m is a prime number) as a hashfunction but my program is still quite slow.