-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PRNG performance with TestU01 or PractRand #8
Comments
Sorry, I don't have the info. I looked at TestU01 long time ago but the interface was so complicated so I gave up. Thank you for PractRand reference. I am going to try mum-prng on it when I have more time. If it does not pass, I probably could make the PRNG passes them but by slowing down the algorithm. |
I'd be interested to see what sort of changes that would require. |
It would require more hashing. I've just finished testing the PRNGs by PractRand (by .. | RNG_test stdin64). As expected XOROSHIRO+ and RAND failed instantly. BBS failed too which is strange as the hash function on which it is built is a crypto-level hash function. CHACHA and SIP24 passed w/o problems as it should be because they are built on proven different crypto-level hash functions. MUM512 has no problems too. I position MUM512 as a crypto-level function although nobody tried to break it or did a crypto-analysis of it. MUM has no problems too. RNG_test reported 8GB input data consumed. But those are preliminary results as RNG_test crashes with sigfault probably at the end of its work. I need to learn PractRand more to be sure that I used it correctly. |
Sorry, it was actually 16GB. |
You may want to replace your |
Thanks for mentioning the new versions of xoroshiro/xoshiro. I've tried xoroshiro128{,++}, xoshiro256{,++), xoshiro512{**,++}. They all failed PractRand in just a few seconds. Although the fastest one xoshiro256+ is about 20% faster than MUM-PRNG. Probably this month, I will update the benchmark script and add a test script using PractRand. Thank you, your issue was useful. |
What specifications did you use for |
Also something went wrong with formatting so I can't quite tell if you tested the |
I think stars were treated as markdown bold markers. Yes, I've tried all star versions too. For example, this is a part of PractRand output for
|
That's odd, my testing has it |
Sorry, I did not set up the seed as it was recommended. After setting the seed all starstar versions passed 4TB stream. I stopped after that. All plus versions failed in a second or two. |
I've added all xoshiro/xoroshiro version results for comparison with other PRNGs. The results were obtained on a modern processor i7-8700K. I hope they will be interesting for you. |
I have added your RNG under the name "wyhash" with the particular wyhash implementation at... It passes Big Crush in my tests. (I have instrumented L'Ecuyer's testu01 so that it is usable.) Well, I am 95% certain that what I present as wyhash (that's the name I found it under) is basically equivalent to your MUM generator... but I admit that I did not dig into your source code too closely. You may be interested in the following blog post: The fastest conventional random number generator that can pass Big Crush? I describe my implementation in simple terms. I'd be interested in your feedback to see whether I am right to think that wyhash is equivalent to your generator. Further reading: Lemire and O’Neill, Xorshift1024*, Xorshift1024+, Xorshift128+ and Xoroshiro128+ Fail Statistical Tests for Linearity, Computational and Applied Mathematics 350, 2019 |
Yes, wayhash looks exactly like MUM-primitive. The issue is that whyhash is not portable. First of all not all GCC targets support 128 arithmetic. So you need to implement 128-bit arithmetic with 64-bit arithmetic. Also on some GCC targets (e.g. aarch64) 128-bit multiplication is slow. You could get faster implementation by using GCC asm extension. As for mum-prng itself, it has a bigger state (1024-bit) and it is updated through the MUM-primitive. |
@vnmakarov Thanks. Coincidentally, I just published the following post: ARM and Intel have different performance characteristics: a case study in random number generation. |
mum-prng
passes NIST STS but that's not the state-of-the-art for PRNG testing.Do you have info on the performance of
mum-prng
in TestU01 or PractRand? PractRand is probably the more convenient of the two.The text was updated successfully, but these errors were encountered: