I put together a script that aims to simulate collisions for different hashes. You can download from http://laramies.com/hashtest.pike It displays average absolute deviation and variance for bucket fill. Feel free to change this and comment. I put in some rudimentary key sets and the results basically say the same as I suggested before. I also added the one from HashMap.java, which seems to be as good and allows for power of two hash table sizes.