> I measured that std::mt19937_64 (the mersenne twister from the standard
> c++ libraries) uses about 40% cpu time during playouts.
> 
> So I wonder: is there a faster prng while still generating good enough
> random?

This question suggests some:
  http://stackoverflow.com/q/1640258/841830

This question is not that useful, but contains links to more information
on alternative random algorithms, and a link to a video presentation:
  http://stackoverflow.com/q/19665818/841830

Random number generation in multi-threaded programs is an interesting
topic, and worth being aware of. (E.g. you don't want to use 16 threads,
only to find all 16 generate the same random sequence, so each thread
generates the same playout as all the other threads.)
(See the example of using thread_local in
http://codereview.stackexchange.com/a/84112 )

40% sounds high. Are you re-initializing the generator each time you
need a new random number?

Darren



-- 
Darren Cook, Software Researcher/Developer
My new book: Data Push Apps with HTML5 SSE
Published by O'Reilly: (ask me for a discount code!)
  http://shop.oreilly.com/product/0636920030928.do
Also on Amazon and at all good booksellers!
_______________________________________________
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Reply via email to