Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9282: performance regression in boost::unordered on 64-bit platforms
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-23 18:42:23
#9282: performance regression in boost::unordered on 64-bit platforms
--------------------------+------------------------------------------------
Reporter: aiapub- | Owner: danieljames
cpp@⦠| Status: assigned
Type: Bugs | Component: unordered
Milestone: Boost | Severity: Regression
1.56.0 | Keywords: unordered mix64_policy performance
Version: Boost |
1.53.0 |
Resolution: |
--------------------------+------------------------------------------------
Comment (by Nate Rosenblum <flander@â¦>):
Came across this yesterday. Pardon the unsolicited feedback, but it's hard
to imagine what one could do to resolve this in the general case; as noted
above, the combination of identity function hash_value<int> + the
insertion order strongly favors the implementation w/o Wang's mixing
function (best case) or the prime policy, both for collision avoidance
(low bits of all keys are unique) and for more efficient use of the cache
write buffer.
One possibility would be to expose the bucket policy as a top-level
template parameter, so that users can pick an appropriate strategy in the
rare occasions that the default is inappropriate(*). As a small side note,
a third policy w/ power-of-two table size that doesn't perturb the hash
value would be slightly more efficient when we know that the hash function
distributes well over the lower bits (e.g. hash_value<std::string>).
(*) It's hard to imagine when this would be; if you know that you're
filling the set/map with entries that will hash to unique consecutive
buckets during insert, a different data structure might be worthwhile.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9282#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC