Thanks for the tip. It does seem a bit faster (5% speedup of the
program overall), and I'm willing to accept the consensus that the
randomness is better.
Peter Drake
http://www.lclark.edu/~drake/
On Jun 6, 2007, at 2:15 PM, Graham Thomson wrote:
I would be weary of using java.util.Random - it is not that random:
http://alife.co.uk/nonrandom/.
A drop in Mersenne Twister replacement for java.util.Random is
available at http://cs.gmu.edu/~sean/research/.
Cheers,
Graham.
On 05/06/07, Peter Drake <[EMAIL PROTECTED]> wrote:
>
>
>
> Oddly, there doesn't seem to be much effect on speed whether I
use a single random number generator (i.e., instance of
java.util.Random) or one for each thread.
>
>
> Peter Drake
> http://www.lclark.edu/~drake/
>
>
>
>
>
>
> On Jun 5, 2007, at 11:59 AM, Jason House wrote:
>
>
>
>
>
> On 6/5/07, Peter Drake <[EMAIL PROTECTED]> wrote:
> >
> > On a multithreaded program like Orego (running on a multicore
machine), it moves the nontrivial random number generation out of
the synchronized part of the program and into the threads.
>
> I'm surprised to hear this. Do you have a single random number
generator? In housebot, Each thread has its own random number
generator instance. Besides avoiding a bottleneck as each thread
generates random numbers, it also opens the door for repeatable
behavior in a single worker thread.
>
> _______________________________________________
> computer-go mailing list
> computer-go@computer-go.org
> http://www.computer-go.org/mailman/listinfo/computer-go/
>
> _______________________________________________
> computer-go mailing list
> computer-go@computer-go.org
> http://www.computer-go.org/mailman/listinfo/computer-go/
>
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/