Debug configurations in VS have a tremendous amount of code-verification built 
in. Buffer overwrites, API usage, use of uninitialized data, and the coverage 
is very extensive. Expensive, too, but totally worthwhile because of the time 
saved for developers. The speed of a debug build is not really that important 
anyway.

 

Check your optimization settings for the Release build. There are a lot of 
optional choices, some of which are not 'safe' in general, and you have to 
measure each one. I recall ~2:1 ratio between the best and worst speeds based 
just on tweaking settings for the Release build of Pebbles.

 

From: [email protected] [mailto:[email protected]] 
On Behalf Of uurtamo .
Sent: Thursday, May 01, 2014 9:34 AM
To: [email protected]
Subject: Re: [Computer-go] C++11; threads

 

That is amazing.

On May 1, 2014 4:00 AM, "Marc Landgraf" <[email protected]> wrote:

Hey, 

I'm not talking about 20% speedloss here with VC++. 

Just the times for 1000 empty playouts on 9x9, not using any sort of 
multithreading:

VS debug configuration: 15257

VS release config (optimized): 756

C::B mingw-w64 no optimizations: 498

C::B mingw-w64 -O3 -fexpensive-optimizations -march=corei7-avx: 108

 

This of course clearly looks as this is certainly my fault... But right now I 
can't find what I'm doing wrong here... and so I have to miss out those handy 
VS-comfort features and continue with C::B + mingw-w64.

And the VS profiler results looks pretty much like what I got, when I last used 
VerySleepy on my code compiled with mingw. No super drastic bottlenecks just 
general slowness it seems.

Mingw-w64 makes it impossible to profile the code, but mingw has performance 
issues as well for me, so I'm using it only when i need profile data (not as 
drastic as VC++, but about factor 3).

 

 

2014-04-30 23:24 GMT+02:00 Aja Huang <[email protected]>:

I wrote my Go program Erica completely in Visual Studio and had no problem at 
all. It might be around 20% slower on Windows than on Linux, but compared to 
other more important factors 20% loss in speed is not really significant. Maybe 
VS profiler can tell why your program ran awfully slow in debug mode.

 

Aja

2014-04-30 21:38 GMT+01:00 Marc Landgraf <[email protected]>:

 

Hey,

in the past I tried VS again and again, and in the end always returned back to 
Code::Blocks... It really feels like VS and me won't find together. Actually, 
after your comment I tried it again today, but even after spending a decent 
amount of time of porting it, the program ran awfully slow in debug mode, and 
crashed, as soon as the VC++ compiler tried to optimize it. (For reasonable 
performance I need optimization with mingw-w64 as well)

Maybe it is just me and my terrible way of coding... But Visual Studio and 
Visual C++ I can't handle properly. 

And with Code::Blocks, I fooled around with various versions of GCC, and ended 
with mingw-w64, which gave me by far the best performance among those 
supporting the for me relevant C++11-features.

 

Marc

 

2014-04-30 11:01 GMT+02:00 Aja Huang <[email protected]>:

Hey Marc,

 

2014-04-30 8:37 GMT+01:00 Marc Landgraf <[email protected]>:

 

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)

 

Why don't you use Visual Studio 2013? CTP_Nov2013 supports a lot of new C++11 
features.

 

http://blogs.msdn.com/b/vcblog/archive/2013/11/18/announcing-the-visual-c-compiler-november-2013-ctp.aspx

 

Aja

 

 

_______________________________________________
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

 


_______________________________________________
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

_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

Reply via email to