On Sat, 2007-10-13 at 18:33 -0300, Isaac Dupree wrote:
> GHC StdGen's random and randomR are somewhat slow.  I found that 
> changing to a custom ((x*a + b) `mod` c) random-generator (instance of 
> RandomGen) much sped things up (since nothing depended on the random 
> numbers being good quality).

Yes, I also switched now to a simple custom linear congruential
generator (which is random enough for this task) and restructured the
code a bit and am happy now since it is even a bit faster than the Java
implementation :)

Thanks,
Thoralf


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to