[Haskell-beginners] questions about randomness

Chaddaï Fouché chaddai.fouche at gmail.com
Sat Oct 10 05:47:01 EDT 2009


On Sat, Oct 10, 2009 at 9:59 AM, Michael Mossey <mpm at alumni.caltech.edu> wrote:
> I would like to know if this is a good way to do this job, both from the
> point of view of elegance and efficiency. Maybe it needs to be more
> strict? I may create lists of 100,000 elements and don't want to run into
> space/time problems.

I think the principal advice we can give you is not to use
System.Random : while the interface is pleasant the performances are
excruciatingly bad... Try one of the alternative like the recently
released statistics package or the mersenne-random package by dons.

A recent blog post that shows the problem :
http://www.serpentine.com/blog/2009/09/19/a-new-pseudo-random-number-generator-for-haskell/

-- 
Jedaï


More information about the Beginners mailing list