numpy performance and random numbers

Gib Bogle g.bogle at auckland.no.spam.ac.nz
Mon Dec 21 18:26:55 EST 2009


sturlamolden wrote:
> On 19 Des, 22:58, sturlamolden <sturlamol... at yahoo.no> wrote:
> 
>> If you pick two random states (using any PRNG), you need error-
>> checking that states are always unique, i.e. that each PRNG never
>> reaches the starting state of the other(s).
> 
> Another note on this:
> 
> Ideally, we would e.g. know how to find (analytically) MT states that
> are very far apart. But to my knowledge no such equation has been
> derived.
> 
> But often in Monte Carlo simulations, the PRNG is not the dominant
> computational bottleneck. So we can simply start N PRNGs from N
> consequtive states, and for each PRNG only use every N-th pseudorandom
> deviate.
> 

OK, now I understand.  In my application I don't care about a thread's PRNG 
reaching the start of another threads.  I do understand that this is not the 
case in all applications.



More information about the Python-list mailing list