Open vlovich opened 6 months ago
Indeed, that would probably increase performance in scenarios where a BuildHasher
is created for hashing only a few bytes. This RandomState w/ increment is interesting (and battle-tested since it's in the std), let's explore this.
First we might want to setup a benchmark to have a sense of the rng overhead relative to the hashing process and to get some before/after numbers.
It looks like GxBuildHasher accesses the Rng on every construction. Can the technique from RandomState be used instead which only does the RNG once per thread & then simply adds 1 to the state used on each construction?