mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 03:47:16 +02:00
streamlined mixing into find (experiment)
This commit is contained in:
@ -1384,8 +1384,18 @@ public:
|
|||||||
template<typename Key>
|
template<typename Key>
|
||||||
BOOST_FORCEINLINE iterator find(const Key& x)
|
BOOST_FORCEINLINE iterator find(const Key& x)
|
||||||
{
|
{
|
||||||
auto hash=hash_for(x);
|
//auto hash=hash_for(x);
|
||||||
return find_impl(x,position_for(hash),hash);
|
auto hash=h()(x);
|
||||||
|
|
||||||
|
boost::uint64_t z=(boost::uint64_t)hash;
|
||||||
|
|
||||||
|
z^=z>>23;
|
||||||
|
z*=0xff51afd7ed558ccdull;
|
||||||
|
z^=z>>23;
|
||||||
|
|
||||||
|
//hash=(std::size_t)z;
|
||||||
|
|
||||||
|
return find_impl(x,position_for(z),z);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Key>
|
template<typename Key>
|
||||||
|
Reference in New Issue
Block a user