Xoroshiro128

46 views
Skip to first unread message

Chris Rutz

unread,
Jan 20, 2020, 10:49:12 PM1/20/20
to prng
Seba,

Regarding xoroshiro128 states 0 and 1, I cannot recall anything specific about the difference in randomness between them.
Obviously you have biased more toward the use of state[0] with ** and ++, but is state[1] noticeably less random (e.g., linear complexity, etc.), and if so, by approximately to what extent?

Thanks,

Chris

Sebastiano Vigna

unread,
Jan 21, 2020, 11:28:38 AM1/21/20
to prng
Frankly, not. We tested it and it works very well. Since it's const it should be faster.

Ciao,

seba

Chris Rutz

unread,
Jan 22, 2020, 6:30:03 PM1/22/20
to prng
Thanks for the reply.

Since you brought up the speed of s0, I am curious if you know of an example where a C compiler will actually use const as a hint in that specific context to generate different code?
The asm dumps I have looked at from all recent gcc and .NET versions (using godbolt.org) show no difference in emitted code with/without 'const' in xoroshiro, and benchmark results also seem to be the same.
Notes I've read on const usage in that context suggest it is still done for 'correctness' even though it has no actual effect.
Reply all
Reply to author
Forward
0 new messages