Random Number Generators: Performance
Scott Robert Ladd
coyote@coyotegulch.com
Tue Apr 27 17:00:00 GMT 2004
Lars Segerlund wrote:
> Would you you mind having a look at the Mersenne twister in
> libgfortran ? Do you think it's up to the job ?
It looks fine to me. Some people here expressed concern about the large
seed register -- however, *any* long-period generator is going to
maintain an array of some size.
> I choose the MT since it has a VERY big period and a not too big
> seed, coupled with a performance which is right 'up there'.
The MT's performance is very good, though it can be consistently beaten
(in terms of random numbers per second) by some of Marsaglia's
generators. I have tended to favor the MT, but use a couple of different
generators to ensure that simulations have not been caught in any
unforeseen traps associate with a given algorithm.
My experience is that people "roll their own" generators, or use
something like SPRNG, when they are serious about stochastic algorithms.
We need to provide a solid, journeyman's implementation that can be
trusted for most applications. The MT is such an implementation, and see
no reason to replace your code with Andy's weaker algorithm
..Scott
--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing
More information about the Fortran
mailing list