Page 6 of 8

User feedback Mr. sitmo's prng

Posted: December 17th, 2013, 7:54 pm
by Cuchulainn
QuoteThe TestU01 framework needs to draw *a lot* (100's of billion) of random numbers to test it quality, and so it want a pointer to your engine functor that it repeatedly call. Would be interesting to do, we can then add the result to the wikipedia entry. I managed to get it working in C++, maybe we can get it to work in managed C++? E.g. it needs to haveYes, no problem , it is possible to call C# from native C++ via Managed C++ (in my Excel C# DLC ... legacy code )

User feedback Mr. sitmo's prng

Posted: December 17th, 2013, 7:56 pm
by Cuchulainn
QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunah! I see!luckily *I* found the answer at google to your complicated question about bits and bytes I see; Next Q I want a double; is this correct?Paging mr. Sitmo, is this code look good? Only difference _now_ is I call Crypto... instead of your prng!

User feedback Mr. sitmo's prng

Posted: December 17th, 2013, 8:47 pm
by Cuchulainn
My first crypto rng for MC!NT = 500, NS = 100000P = 5.85344( P exact = 5.84584)Not bad for my 001 test.// will need >=2 dedicated threads for crypto RNG

User feedback Mr. sitmo's prng

Posted: December 18th, 2013, 6:28 am
by Cuchulainn
QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnFind? I knew it for years I just didn't tell anyone!Here is my example. Q: is the byte stuff OK?QuoteWe could run it though the TestU01 framework and test its random quality?You mean the output?? It is C# code.The TestU01 framework needs to draw *a lot* (100's of billion) of random numbers to test it quality, and so it want a pointer to your engine functor that it repeatedly call. Would be interesting to do, we can then add the result to the wikipedia entry. I managed to get it working in C++, maybe we can get it to work in managed C++? E.g. it needs to haveextern "C"{#include "unif01.h"#include "bbattery.h"}I did test #2 on crypto rng; roughly on a reasonable machine using single threading it takes 30 minutes to compute 300 million rns. So, I reckon we need a multicore (have you acccess to say 16 cores?) solution for 100 billion.And a 16:1 producer-consumer solution is not a luxury here. Do you have C# compiler? (Express is free); on linux is called Mono.

User feedback Mr. sitmo's prng

Posted: December 18th, 2013, 9:45 am
by Cuchulainn
Here is runnable code for your TestU01 , it's quite fast, extrapolate ==> about 10 hours on slow vostro 1710.

User feedback Mr. sitmo's prng

Posted: December 18th, 2013, 9:53 am
by Cuchulainn
And I suspect that crypto rng is thread-safe do then processing time = 10 hours / Number_of_processors. Bingo.

User feedback Mr. sitmo's prng

Posted: December 18th, 2013, 11:59 am
by Cuchulainn
QuoteOriginally posted by: outrunNice, so you time it at 10bln random draws/hr? That's good enough for running test (but 70x slower than native C++ if you look for production MC engines).I would start it and hope that you find something interesting to publish! Maybe it fails some tests? That would be a cool research result that would get attention. Also proving that it passes all test is also a very good result. You could also repeat it for the simple random .NET generator and maybe find something there as well?Just tested 10 billion .. 1 h 46 mIn all fairness crypto rng is not meant for MC rng as it is 8 times slower than Random.What is good (?) is to use crypto for 1. GUID seed for MC rng2. Parallel seeds for nonlinear optimisation searches

User feedback Mr. sitmo's prng

Posted: December 18th, 2013, 1:27 pm
by Cuchulainn

User feedback Mr. sitmo's prng

Posted: December 18th, 2013, 3:19 pm
by Cuchulainn
QuoteOriginally posted by: outrunIf I look at the timing then native C++ looks *much* faster than managed C++ (my rng does 10bln in 53 secs). It that really the case? If so, would the coding easy outweight the performance loss if you build a production MC engine?Bytes have to be converted to ints. So, can expect