Get the distance between two hashes