From c4cc805063bfd0c78e8f0febaea23347ad10b1a5 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Mon, 10 Oct 2022 21:06:33 +0200 Subject: [PATCH] embed xmx code directly into xmx_mix --- include/boost/unordered/detail/foa.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/boost/unordered/detail/foa.hpp b/include/boost/unordered/detail/foa.hpp index fca3b2c0..cf1ce6a7 100644 --- a/include/boost/unordered/detail/foa.hpp +++ b/include/boost/unordered/detail/foa.hpp @@ -604,7 +604,14 @@ struct xmx_mix template static inline std::size_t mix(const Hash& h,const T& x) { - return xmx(h(x)); + //return xmx(h(x)); + boost::uint64_t z=(boost::uint64_t)(h(x)); + + z^=z>>23; + z*=0xff51afd7ed558ccdull; + z^=z>>23; + + return (std::size_t)z; } };