lazy smp using ms vs2015 c++11 std::async

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
jdart
Posts: 3953
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

Re: lazy smp using ms vs2015 c++11 std::async

Post by jdart » Sun Jul 31, 2016 5:17 pm

It is possible that some programs might benefit from it.

However, two hyperthread cores in the same execution unit share everything in the memory system. So it is possible for HT to increase memory contention, especially when RAM is limited and is being heavily utilized. (There is a pretty recent paper that basically says this: https://www.nas.nasa.gov/assets/pdf/pap ... g_2011.pdf).

--Jon

edwardyu
Posts: 34
Joined: Mon Nov 17, 2008 5:58 am

Re: lazy smp using ms vs2015 c++11 std::async

Post by edwardyu » Tue Aug 02, 2016 5:22 pm

Yes, Eychessu is my Xiangqi engine. I have been away from computer chess for sometime and pick it now, Before heard of lazy smp, I have tried using MS VC++ PPL to implement smp with splitting at the PV and non-PV nodes, but the result was worse than single thread (due to the vast overhead of concurrency) !!!

Instead of setting up threadpool, I like the simplicity of std::async. However, I found that even I use 2 real-core threads (no HT) to run lazy smp, the result is marginally break-even to offset the smp overhead.

Post Reply