| Crates.io | xorshiftr-wide |
| lib.rs | xorshiftr-wide |
| version | 0.1.0 |
| created_at | 2025-11-30 16:35:09.898308+00 |
| updated_at | 2025-11-30 16:35:09.898308+00 |
| description | high-throughput non-cryptographic PRNG |
| homepage | |
| repository | https://github.com/DavidM603/xorshiftr-wide |
| max_upload_size | |
| id | 1958445 |
| size | 18,044 |
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.