Hi,
my bot is still under construction, but written entirely under C++11. So
few comments:
General:
Most compilers, especially if you are using Windows, still have problems
with C++11 and it's new multithreading library. Right now I'm using
mingw-w64-4.8.1 as it has the required support for <thread>, even so it is
done with some workaround via winpthreads, and gives a decently fast code.
But I'm also interested if anyone else can share his experience with other
compilers. (for windows)
Multithreading:
The new <thread> library fulfills all my requirements for my Bot. But I
also haven't tested it with boost::thread, so I can't draw conclusions
concerning which is faster.
Synchronization:
The improved <atomic> for base types are as fast as the base types itself
and really useful, when running with multiple threads on the same tree.
This is not true for <mutex>. Those can cause a dramatic slowdown, if used
too often. For that reason I reduced the usage of <mutex> to an absolute
minimum. With those reduction, <condition_variable> disappeared entirely
from my code, and I can't tell how well they performed. (I initially had
some consumer producer queue, to spread out playouts over multiple threads,
now i switched to all threads doing full exploration+playout-runs)
Other:
To me, the most noticeable other feature is the reworked auto-keyword,
which mostly improves code readability, and more important the new
for-loops iterating over any STL-container. Those new loops not only
improve readability even more, but on some occasions can cause drastic
speed improvements compared to the old style looping.

Best Regards, Marc


2014-04-30 3:10 GMT+02:00 Darren Cook <[email protected]>:

> A round of compiler/OS upgrades mean I'm finally able to use C++11 in
> real-world projects, so I've been re-studying all the new features. I
> know the computer go community really cares about their CPU cycles, and
> also that C++ is widely used, so I'd love to hear stories "from the
> frontline" about which C++11 things you are using (or not) and why.
>
> I'm especially interested in if the threading library is good enough for
> the high-performance parallel tree searches people are using. It is
> mostly boost::thread, which I was already using, but futures are new
> (*), and then there is the low-level memory model and atomics.
>
> Darren
>
> *: I've been using futures to handle the async complexity in
> JavaScript/jQuery. For certain kinds of problems they can be a very
> graceful solution.
>
> --
> 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
> [email protected]
> http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
>
_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

Reply via email to