|
|
|
|
|
by danbruc
4320 days ago
|
|
It is in multiple ways. First, you are wasting cycles and with so little work to do before reseeding as in the code shown it probably matters quite a bit. Second, some random number generators need some warm-up time producing lower quality random numbers at the beginning. Third, if you are reseeding faster than your seed changes, you will repeatedly consume the same sequence of random numbers. I am not sure what the resolution of Now() is, but unless it is on the order of nanoseconds this will heavily affect the shown implementation. If the resolution is one millisecond and it took 15 seconds to execute on a single thread, then the generated random values changed only every 74 iterations. |
|