Print

Print


Hi Tony,

I checked java.util.Random several years ago, and at that time it was
really bad - somewhat slow and with obviously periodic behavior. I
would not be surprised if Sun had fixed it since then, but it still lacks
utilities like generating vectors of random numbers, which makes it
effectively slow for many applications.

- Dima.

> I completely agree with Norman that the java.util.Random class is the best
thing to use.
>
> I don't know of any studies that show how good a random number generator
java.util.Random is, I would guess that it is good enough for anything we
are doing right now. If anyone has the time/interest it might be useful to
compare it with the random number generators in the colt package
>
>
http://www-itg.lbl.gov/~hoschek/colt/api/cern/jet/random/engine/package-summary.html
>
> which claim to be very good and fast.
>
> Tony
>