Cheap random number generator with `std`

But also: Random data might result in a worse or better performance than if you used real data and/or consecutive numbers. (I.e. the real data might be a lot unlike random data, too; if the form of the data turns out to be relevant for the benchmark in the first place.)


Of course, random data is a reasonable test case nonetheless. If the reason you are looking for particularly fast RNG is because you want to avoid benchmarking the time for generating random data together with the actual thing to be benchmarked, it might also be reasonable to simply generate the data in advance, and only then start the benchmark.

4 Likes