phmap mix is a pretty good rehash function.
In a multi-stage aggregation process I want to use different mix values.
But I don't know how to generate a proper mix seed.
template<>
struct phmap_mix<8>
{
// Very fast mixing (similar to Abseil)
inline size_t operator()(size_t a) const
{
static constexpr uint64_t k = 0xde5fb9d2630458e9ULL;
// static constexpr uint64_t k = 0x7C9D0BF0567102A5ULL; // [greg] my own random prime
uint64_t h;
uint64_t l = umul128(a, k, &h);
return static_cast<size_t>(h + l);
}
};
phmap mix is a pretty good rehash function. In a multi-stage aggregation process I want to use different mix values. But I don't know how to generate a proper mix seed.
in absl