I have about 50,000 words that I want to map each of them to a 16bit number and I'm seeking for a hash function to run on j2me. To be more specific I'm looking for a hash function with below criteria:
- few (or no) collisions
- light CPU load
- I have all of the words now
- Avalanche effect is not important, since it's not about security. It' just a look-up table.
I've tested java Strign.hashCode(), murmur hash, jenkins one at a time and a few simple hand-made ones but all of them have at least 30% collisions.
The minimal perfect hashing seems to have heavy CPU load for a small mobile phone too.
Can anybody help me with this?
note: As you know murmur algorithm needs a seed and different seeds have different uniformity. How can I find the seed with minimum collisions?
Thank you in advance