Function rapidrng_fast

Source
pub fn rapidrng_fast(seed: &mut u64) -> u64
Expand description

Generate a random number using rapidhash mixing.

This RNG is deterministic and optimised for throughput. It is not a cryptographic random number generator.

This implementation is equivalent in logic and performance to wyhash::wyrng and fasthash::u64, but uses rapidhash constants/secrets.

The weakness with this RNG is that at best it’s a single cycle over the u64 space, as the seed is simple a position in a constant sequence. Future work could involve using a wider state to ensure we can generate many different sequences.