I use a simple mantra. If in doubt about whether to do something or not I simply ask:"How much will it cost to do something?". If the answer is next to nothing, then I do it.Paul wrote:it is not useful for you yet.
At the end of PCG32II.bas I use:
Code: Select all
Dim Shared As pcg32 pcg
#undef Rnd
#define Rnd pcg.randse
Here is the head of some timing code.
Code: Select all
'#include "PCG32II.bas" ' Use Rnd
'#include "MsWs.bas" ' Use Rnd
'#define Algo 2 ' Intel RdRand for CryptoRndII
'#include "CryptoRndII.bas" ' Use Rnd
'#Include "CMWC4096.bas" ' Use CMWCse
'#include "xoroshiro128.bas" 'Use Rnd
'#include "xoshiro256.bas" ' Use Rnd
So, when timing a particular generator I simply use the appropriate #include for all except CMWC4096.
Pasting code from the forum or using our code which uses Rnd we simply use #include and have nothing else to do.
So, if in doubt about randomness and/or speed required if we use #include "PCG32II.bas", with the correct path, for example, the two questions are rendered academic.
The above requires a bit of effort but it is only a one off task.
Some generators need to be warmed up, some don't. I have some code to test that but I dont use it - I warm up anyway. The warm up is in the nanosecond domain so costs me virtually nothing to implement; whether to warm up or not is also rendered academic.