vladstamate wrote:
I can testify to that. I got roughly 12% increase in speed (both when doing perft as well as normal search) by using PGO. In Visual Studio that is done as simply as clicking 3 buttons and waiting your program to run for some time so it gets some performance data. I was quite impressed.
You are a lucky one. Or you just happen to write "branchy" code. In my experience with Critter there is only cca 5% speedup from PGO
PGO improvements depend very much on the code.
On my current code PGO provokes a 2% slow-down compared to the normal /O2 /GL compile. PGO doesn't seem to achieve a lot apart from inflating the exe from 233 kB to 277 kB .
Dann Corbit wrote:
I have seen up to 30% for some engines.
I usually do the following sort of test during the profile sessions:
1. A couple hundred EPD test positions at 5 seconds each
2. At least ten games of engine verses engine.
3. Perft (if the engine has it) at depths 4/5/6
On the games, I have the GUI restart the engines after each game.
Is the pgo data produced by running the instrumented executable incremental? That is when you run it each time does it add to the same file or replace?
silentshark wrote:The subject field says it all, really. What are good compiler flags to wring out good speed from the MS C++ 2008 compiler?
So far, I've found the following are good:
/O2 - optimise speed
/arch:SSE2 - compile for platforms supporting SSE2 instruction set
But there are probably some other ones I haven't come across?
(And feel free to tell me to go and use compiler X, if I really should be trying something else for high speed code these days)
Regards,
Tom
The Intel compiler produces a little bit better results, most of the time.
Profile guided optimization produced a good gain almost all the time (for both Intel and MSVC++ compilers).
I will give pgo a go, although it looks like a need a better version of the dev. environment.. vc++ 2008 express appears to lack the pgo stuff
Dann Corbit wrote:
I have seen up to 30% for some engines.
I usually do the following sort of test during the profile sessions:
1. A couple hundred EPD test positions at 5 seconds each
2. At least ten games of engine verses engine.
3. Perft (if the engine has it) at depths 4/5/6
On the games, I have the GUI restart the engines after each game.
Is the pgo data produced by running the instrumented executable incremental? That is when you run it each time does it add to the same file or replace?
Also has anyone tried (successfully) pgo on gcc?
Regards,
Vlad
With MSVC++, each new pgo profile run creates a new file. When you perform the link, all the files get merged.
PGO works well with gcc also. However, my 64 bit GCC installation is flaky now and I have not been able to repair it.
silentshark wrote:The subject field says it all, really. What are good compiler flags to wring out good speed from the MS C++ 2008 compiler?
So far, I've found the following are good:
/O2 - optimise speed
/arch:SSE2 - compile for platforms supporting SSE2 instruction set
But there are probably some other ones I haven't come across?
(And feel free to tell me to go and use compiler X, if I really should be trying something else for high speed code these days)
Regards,
Tom
The Intel compiler produces a little bit better results, most of the time.
Profile guided optimization produced a good gain almost all the time (for both Intel and MSVC++ compilers).
I will give pgo a go, although it looks like a need a better version of the dev. environment.. vc++ 2008 express appears to lack the pgo stuff
Is the Intel compiler a freebie?
cool.. the pgo stuff in vc++ 2010 seems to give me about a 15% performance boost. Worth having..
My checkers engine is totaly dependent on the GUI for commands.
After I launch the GUI and it loads the engine is it possible to atach VS2008 to the engine process and execute the PGO?
Actually, you just build a PGO-instrumented build of your checkers engine and use that. Each time the program runs, it automatically outputs a file with the technical timing/performance data. You can then use this data to build a PGO optimized version. Visual studio doesn't itself need to be running for the profiling session.