Previous: , Up: Random Number Generation   [Contents][Index]


2.19.2 xoroshiro128+ Generator

On supported platforms, the random number generator is xoroshiro128+ generator, as indicated by :random-xoroshiro being in *features*. This is a Lisp implementation of the xoroshiro128+ generator by David Blackman and Sebastiano Vigna. See http://xoroshiro.di.unimi.it for further details.

This generator replaces the MT-19937 generator (see MT-19937 Generator) because it is faster and uses much less memory for the generator (4 32-bit words). However, the period is shorter.

When CMUCL starts up, *random-state* is initialized by reading 4 32-bit words from /dev/urandom, when available. If /dev/urandom is not available, the universal time is used to initialize *random-state*. The initialization is done is using splitmix64 with get-universal-time.

Function: kernel:random-state-jump &optional (rng-state *random-state*)

Jump the rng-state. This is equivalent to 2^{64} calls to the xoroshiro128+ generator. It can be used to generate 2^{64} non-overlapping subsequences for parallel computations.