DCSIMG
Random.NextBytes - Dotmad (on .Net)

Dotmad (on .Net)

Just Another Web 5.0 Blog

Podcasts

Blogroll

Browse by Tags

All Tags » Random.NextBytes (RSS)
Random.NextBytes Performance Issues
בעיות ביצועים עם מחלקת Random I have became aware recently to a performance problem with the Random class, specifically the Random. NextBytes method. As it turns out this is an expansive operation: The graph displays the number of milliseconds used to perform 10,000,000 operations. The NextBytes method handle a byte array containing only 4 bytes. This is linear - using an array of 4000 bytes will take 1000 times longer to complete the operation! However, there may be a work-around using the BitConverter...