On 27 feb 2006, at 00:15, A.J. Venter wrote:

   Randomize;
   RandSeed := RandSeed * getpid;
This worked, cut the initial generation time from about 30 seconds down to under 1, of course right now it's NOT platform independent at all so I will need to enhance it but I like the direction of your thinking, combining randseed with some virtually guaranteed unique value solves the problem.

It's not just that, but randseed is not a threadvar. This means that all your threads use the same randseed variable, so if two threads call "random" at the same time they will still get the same "random" number.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to