public void GeneratorOverhead() { var source = new XorShiftRandomSource(); var random = new Generator(source); random.UInt64(); const int N = 10000000; var sw = Stopwatch.StartNew(); for (int i = 0; i < N; i++) { random.UInt64(); } Trace.WriteLine(sw.Elapsed.TotalSeconds * 1e9 / N + "ns/64b, " + N * sizeof(ulong) / sw.Elapsed.TotalSeconds / 1e9 + "GB/s"); }
public void CloneTest() { var source = new XorShiftRandomSource(); SHA256RandomSourceTests.CloneTest(source); }