$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Hash collision for pairs of int
From: Igor R (boost.lists_at_[hidden])
Date: 2013-11-27 13:48:01
> I'm experiencing a lot of collisions using the hash_combine function in functional/hash/hash.hpp for integer-pairs-as-keys when there are few unique ints in each of the pair's positions (put together the keys themselves are unique of course).
>
> I've uploaded a simple enough test case here: http://www.speedyshare.com/Wcem6/hash.cc.gz. If there's a more preferred way to upload, let me know and I'll reupload. With 400K pairs, this returns only 86K unique indices and has a max of 18 collisions in size_t.
>
> Am I doing something really wrong here?
Perhaps your case is similar to this one:
http://stackoverflow.com/questions/19966041/getting-too-many-collisions-with-hash-combine