[feature] Maintain maphash fork to avoid initSeed in Sum64
gaocegege opened this issue · 1 comments
gaocegege commented
We do not want to initSeed in Sum64.
// Sum64 returns h's current 64-bit value, which depends on
// h's seed and the sequence of bytes added to h since the
// last call to Reset or SetSeed.
//
// All bits of the Sum64 result are close to uniformly and
// independently distributed, so it can be safely reduced
// by using bit masking, shifting, or modular arithmetic.
func (h *Hash) Sum64() uint64 {
h.initSeed()
return rthash(h.buf[:h.n], h.state.s)
}
gaocegege commented
We need to use consistent hash