From a74962bc3c60691843bc913e354c1bdaea50e59d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 30 Jan 2023 20:03:01 +0200 Subject: [PATCH] Revert reversion of 32 bit mulx multiplier --- include/boost/unordered/detail/mulx.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/unordered/detail/mulx.hpp b/include/boost/unordered/detail/mulx.hpp index aa50f72a..c2ec2701 100644 --- a/include/boost/unordered/detail/mulx.hpp +++ b/include/boost/unordered/detail/mulx.hpp @@ -107,11 +107,13 @@ inline std::size_t mulx( std::size_t x ) noexcept { #if defined(BOOST_UNORDERED_64B_ARCHITECTURE) + // multiplier is phi return (std::size_t)mulx64( (boost::uint64_t)x, 0x9E3779B97F4A7C15ull ); #else /* 32 bits assumed */ - return mulx32( x, 0x9E3779B9u ); + // multiplier from https://arxiv.org/abs/2001.05304 + return mulx32( x, 0xE817FB2Du ); #endif }