C# (CSharp) Redzen.Numerics XorShiftRandom.NextBytes8 - 1 Beispiele gefunden. Dies sind die am besten bewerteten C# (CSharp) Beispiele für die Redzen.Numerics.XorShiftRandom.NextBytes8, die aus Open Source-Projekten extrahiert wurden. Sie können Beispiele bewerten, um die Qualität der Beispiele zu verbessern.
A version of NextBytes that uses a pointer to set 4 bytes of the byte buffer in one operation thus providing a nice speedup. The loop is also partially unrolled to allow out-of-order-execution, this results in about a x3 speedup on an Intel Core i7 920 (Bloomfield). Thus performance may vary wildly on different CPUs depending on the number of execution units available. Another significant speedup is obtained by setting the 4 bytes by indexing pDWord (e.g. pDWord[i++]=_w) instead of dereferencing it (e.g. *pDWord++=_w). Note that this routine requires the unsafe compilation flag to be specified and so is commented out by default.