[
https://issues.apache.org/jira/browse/RNG-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16945835#comment-16945835
]
Alex Herbert commented on RNG-122:
----------------------------------
{quote}Isn't it a bit overkill,
{quote}
It is more a point of why use a generator that has been superceded? I ran all
the tests to see if an upgrade was possible, and which new generator to pick.
Re: Bit order. The ordering is used to more strictly test the sequence.
BigCrush favours the upper bits. So when they are reversed the test finds
problems it doesn't usually detect. But these are still problems.
I tend to agree that it won't make a difference to seeding as the seeds are
always small and the linearity issue will not manifest to create bad seeds.
However given this is a known issue with the XorShift1024s generator I think we
should acknowledge that and change to a better one.
The runtime performance of the two generators on long output is near identical
(the new one is marginally slower). It is a simple upgrade.
> Change SeedFactory random source
> --------------------------------
>
> Key: RNG-122
> URL: https://issues.apache.org/jira/browse/RNG-122
> Project: Commons RNG
> Issue Type: Improvement
> Components: simple
> Affects Versions: 1.3
> Reporter: Alex Herbert
> Assignee: Alex Herbert
> Priority: Trivial
>
> The SeedFactory uses {{XOR_SHIFT_1024_S}}. This has a systematic failure in
> BigCrush using the lower 32-bit bit in reverse order:
> [Xorshift1024*, xorshift1024+, xorshift128+ and xoroshiro128+ fail
> statistical tests for
> linearity|https://www.sciencedirect.com/science/article/pii/S0377042718306265?dgcid=author]
> I have tested {{XOR_SHIFT_1024_S}} and {{XOR_SHIFT_1024_S_PHI}} using 10 runs
> of BigCrush and see the following results:
> {noformat}
> RNG Bit-reversed TestU01 (BigCrush)
> XOR_SHIFT_1024_S true 1,2,1,1,1,1,2,2,1,1
> XOR_SHIFT_1024_S_PHI true 1,1,1,1,2,1,1,1,1,1
> RandomSource,Bit-reversed,Test,Failures,Failed
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),2,68 MatrixRank, L=1000, r=0|80
> LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),2,25 ClosePairs mNP2S, t = 16|80
> LinearComp, r = 0
> XOR_SHIFT_1024_S,true,TestU01 (BigCrush),2,74 RandomWalk1 M (L=50, r=0)|80
> LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),1,80 LinearComp, r = 0
> XOR_SHIFT_1024_S_PHI,true,TestU01 (BigCrush),2,80 LinearComp, r = 0|80
> LinearComp, r = 0
> {noformat}
> This shows a systematic failure of the {{LinearComp}} test as observed in the
> paper linked above.
> Update the SeedFactory to use a different generator.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)