Thread: Random numbers
View Single Post
Old 16 November 2020, 12:22   #14
a/b
Registered User

 
Join Date: Jun 2016
Location: europe
Posts: 298
moveq #oh-how-i-love-arguing-with-internet-strangers-about-nothing,d0
...
not.l d0

Again, you are missing the point. Taking a step back, xorshift is not some mumbo jumbo, and as i said it passes the bigcrush test which is a few hours long test.
Now, back to code I posted... You should stop looking at this from your point of view only, especially in a coders/asm forum.
- Original poster said, in a general manner, that he needs a fast algorithm but doesn't specify how fast is fast enough for his definition of fast in this fast moving thread.
- Apply 2-out-of-3 rule.
- Different people present different options.
0-1 choice
0-$ff better choice
0-$ffff betterer choice
0-$ffffffff bettererer choice
So what's the problem? Need better accuracy (*again*, 2-out-of-3 rule)?
1. pick a better seed/modifier
2. use shift/ror instead of a swap
3. use 2x32 bits
...
9. use the "full-blown" xorshift algorithm, which is still plenty fast, if you still like this type of rng
10. use something else that you like more or that works better in your, and unknown to us, scenario
a/b is offline  
 
Page generated in 0.07634 seconds with 11 queries