in reply to Re^2: Is rand() really that slow or am I just using it wrong?
in thread Is rand() really that slow or am I just using it wrong?
My confusion came from a recent experience of using rand() to generate 50,000 unique random numbers over a range of 1 to ~3,000,000,000. It worked fine on osx and linux, but not when I tested it on windows xp, where it struggled to ~32000 unique numbers and gave up. I can see though that if the numbers don't need to be unique and are within a small range, this wouldn't be a problem.
I still don't quite understand why this was only an issue on windows - will have to go and google it a bit more.
In any case, thanks for the correction!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Is rand() really that slow or am I just using it wrong?
by BrowserUk (Patriarch) on Aug 09, 2013 at 00:03 UTC | |
by bulk88 (Priest) on Aug 10, 2013 at 21:54 UTC | |
by BrowserUk (Patriarch) on Aug 11, 2013 at 05:19 UTC |