How to efficiently test a hashing algorithm?
Hello everyone! I just wrote a non cryptographic hashing algo (hash function) 3 days ago, I've been testing it for collisions (if any). I want some sample data or a way to generate the data, and also the possible ways of testing, currently to check collisions, I'm trying to fetch keys from hashmap and if there exists a key and the value is different (i.e. 2 values, different hashes) then it's will add to the count of collisions.
I've tried it on various sets of data, and it always gives 0 collisions, I also took default hashmap and put same kay and same value and on other hand I took value of my hash function and actual value which is hashed, it gives 0 collisions and same hashmap lengths on the set of data which I'm trying on.
I tried bench marking the hashmaps (one with key as my hashed value and other with same key and same value), it turns out that it's 10x faster with my hash function, which looks too good to be true so I NEED some real data to test with.