xorshiftr-wide

Crates.ioxorshiftr-wide
lib.rsxorshiftr-wide
version0.1.0
created_at2025-11-30 16:35:09.898308+00
updated_at2025-11-30 16:35:09.898308+00
descriptionhigh-throughput non-cryptographic PRNG
homepage
repositoryhttps://github.com/DavidM603/xorshiftr-wide
max_upload_size
id1958445
size18,044
(davidmcmurray)

documentation

https://docs.rs/xorshiftr-wide

README

xorshiftr-wide

A high-throughput PRNG, designed to autovectorize well and fill buffers. Currently, filling &mut [u64] is supported, and it is up to the user to adapt these random bits to their needs. Compiling with a target-cpu set in your RUSTFLAGS is recommended.

To use this crate, you will need a source of randomness for seeding; some suggested options are getrandom and rand's rng().

The design is largely based on the paper A random number generator for lightweight authentication protocols: xorshiftR+. Their default shift constants and ordering passed BigCrush. The modified shift constants and ordering used in xorshiftr-wide last longer in PractRand, and have passed 32TB with 16 lanes. Testing is underway in search of further improvements.

Commit count: 0

cargo fmt