Generates 32 bits of output from 64 bits of state. A fast generator
with excellent statistical properties for memory-constrained situations
where more than 64 bits of state would be too much and generating
only 32 bits with each opCall will not cause a slowdown. If you need
a generator with 64 bits of state that produces output 64 bits at a time
SplitMix64
is an option.
Note that xorshift64*/32 is slower than xorshift1024* even when only
32 bits of output are needed at a time.
<a href="https://web.archive.org/web/20151209100332/http://xorshift.di.unimi.it:80/">
Per Vigna:</a>
<blockquote>
The three xor/shifts of a xorshift64* generator must be executed sequentially,
as each one is dependent on the result of the previous one. In a xorshift1024*
generator two of the xor/shifts are completely independent and can be
parallelized internally by the CPU.
</blockquote>
Generates 32 bits of output from 64 bits of state. A fast generator with excellent statistical properties for memory-constrained situations where more than 64 bits of state would be too much and generating only 32 bits with each opCall will not cause a slowdown. If you need a generator with 64 bits of state that produces output 64 bits at a time SplitMix64 is an option.
Note that xorshift64*/32 is slower than xorshift1024* even when only 32 bits of output are needed at a time. <a href="https://web.archive.org/web/20151209100332/http://xorshift.di.unimi.it:80/"> Per Vigna:</a> <blockquote> The three xor/shifts of a xorshift64* generator must be executed sequentially, as each one is dependent on the result of the previous one. In a xorshift1024* generator two of the xor/shifts are completely independent and can be parallelized internally by the CPU. </blockquote>
<a href="https://web.archive.org/web/20151011045529/http://xorshift.di.unimi.it:80/xorshift64star.c"> Public domain xorshift64* reference implementation (Internet Archive).</a>