#random #mwc #pcg #produce

no-std pcg-mwc

A fast non-cryptographic psudo random number generator

3 unstable releases

0.2.1 Jun 7, 2021
0.2.0 Jun 7, 2021
0.1.0 May 25, 2021

#2342 in Algorithms

Download history 2951/week @ 2025-02-12 5586/week @ 2025-02-19 6545/week @ 2025-02-26 6093/week @ 2025-03-05 7569/week @ 2025-03-12 5845/week @ 2025-03-19 7883/week @ 2025-03-26 8533/week @ 2025-04-02 9175/week @ 2025-04-09 7209/week @ 2025-04-16 5374/week @ 2025-04-23 4738/week @ 2025-04-30 2886/week @ 2025-05-07 5145/week @ 2025-05-14 3578/week @ 2025-05-21 4469/week @ 2025-05-28

16,886 downloads per month
Used in 3 crates

MIT/Apache

16KB
244 lines

Permuted Mwc random number generator

It is a member of the PCG family but uses an MWC generator instead of an LCG. This an MWC is special form of a MCG generator similar to the PGC-64-fast variant.

Compared to PGC-64-fast, Mwc256XXA64 is both faster and produces higher quality rand numbers (due to using the full 256bit state as opposed to only half of it.)

For a detailed description of the design, see: https://tom-kaitchuck.medium.com/designing-a-new-prng-1c4ffd27124d

Mwc256XXA64

A fast high quality PRNG with 64bits of output, and a 256bit state. This is faster on 64bit architectures.

Mwc128XXA32

A fast high quality PRNG with 32bits of output, and a 128bit state. This is faster on 32bit architectures.

Dependencies

~200KB