diff --git a/include/util/xor_fast_hash.hpp b/include/util/xor_fast_hash.hpp index 9e74132bc0..4487a2295e 100644 --- a/include/util/xor_fast_hash.hpp +++ b/include/util/xor_fast_hash.hpp @@ -42,13 +42,11 @@ template class XORFastHash public: XORFastHash() { - std::mt19937 generator(1); // impl. defined but deterministic default seed + std::mt19937 generator(0xdeadbeef); + std::uniform_int_distribution<> distrib(0, UINT16_MAX); - std::iota(begin(table1), end(table1), 0u); - std::shuffle(begin(table1), end(table1), generator); - - std::iota(begin(table2), end(table2), 0u); - std::shuffle(begin(table2), end(table2), generator); + std::fill(begin(table1), end(table1), distrib(generator)); + std::fill(begin(table2), end(table2), distrib(generator)); } inline std::uint16_t operator()(const std::uint32_t originalValue) const