2 ms·
That's an awful hash function. The largest bucket has more than 4X as many items as the smallest. He should pick another function that uses all the characters i
by gojomo 16y ago
That's an awful hash function. The largest bucket has more than 4X as many items as the smallest. He should pick another function that uses all the characters in the object name. Whatever language or libraries he's already using probably has a better function for strings handy.
- acqq 16y agoI don't know in which language he implements this, but if it's in any efficient language he should certainly use all the characters. Some interesting benchmarks (and also some very interesting links in the comments!) can be found at: http://www.strchr.com/hash_functions http://www.strchr.com/hash_functions