What’s the fastest way to randomly generate numbers, either randomly or simulating random? I don’t really need a true random number generator, it would be acceptable to simulate random. I tried other random simulation methods but none were faster than this.
Here’s the fastest way I have now:
Private myRandom As New System.Random(CType(System.DateTime.Now.Ticks Mod System.Int32.MaxValue, Integer))
Private sub Test1
Dim F as integer = myRandom(0, 203)
End Sub
The fastest way I can think of to get random numbers is to generate a large array of random numbers in advance that you cycle through repeatedly. This could also yield very poor quality results unless the size of the array were enormous. Quality would also be affected by how you generate the numbers.