Usually, that is the result of undefined behavior in the code.Engin wrote:i done the same way, but i dont running so long time, after the optimization i get some errors, that i dont get if i compiled normal without PGO
Optimization for speed in VS 2008
Moderator: Ras
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Optimization for speed in VS 2008
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Optimization for speed in VS 2008
Try them both with your code.Engin wrote:are you suggest that this option is worse ? Ob2 too ?
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Optimization for speed in VS 2008
Try menu option "Analze" option choice "Run Code Analysis"
Sometimes this will point out problems in the code.
Sometimes this will point out problems in the code.
-
- Posts: 1001
- Joined: Mon Jan 05, 2009 7:40 pm
- Location: Germany
- Full name: Engin Üstün
Re: Optimization for speed in VS 2008
i dont know where this option "analyse" is or this option did not exist on my compiler version.
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Optimization for speed in VS 2008
That is a shame. Maybe it only comes in the expensive versions.Engin wrote:i dont know where this option "analyse" is or this option did not exist on my compiler version.
It is the most valuable feature of the new compiler, in my view.
-
- Posts: 170
- Joined: Mon Sep 13, 2010 9:57 am
- Location: Frankfurt am Main
Re: Optimization for speed in VS 2008
Hmm, I have the feature, and I tried it with all warnings turned on. Zero warnings, so my code is plain and simply slow...Dann Corbit wrote:That is a shame. Maybe it only comes in the expensive versions.Engin wrote:i dont know where this option "analyse" is or this option did not exist on my compiler version.
It is the most valuable feature of the new compiler, in my view.
Also a really nice feature is the built-in profiler.

As for the incredible speed of Crafty. I have no idea as well how that works. Perhaps having only a single source file where includes are ordered according to their usage is making the difference there.
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Optimization for speed in VS 2008
The single file idea gives 5% at most.OliverUwira wrote:Hmm, I have the feature, and I tried it with all warnings turned on. Zero warnings, so my code is plain and simply slow...Dann Corbit wrote:That is a shame. Maybe it only comes in the expensive versions.Engin wrote:i dont know where this option "analyse" is or this option did not exist on my compiler version.
It is the most valuable feature of the new compiler, in my view.
Also a really nice feature is the built-in profiler.
As for the incredible speed of Crafty. I have no idea as well how that works. Perhaps having only a single source file where includes are ordered according to their usage is making the difference there.
As for incredible speed, what is the thing that you marvel at?
Is it the perft?
Is it the search NPS?
-
- Posts: 170
- Joined: Mon Sep 13, 2010 9:57 am
- Location: Frankfurt am Main
Re: Optimization for speed in VS 2008
The search NPS is what amazes most, I think. On my x64 notebook Crafty 23.3 (JA) is 20-30% faster than Kurt (my compile, well wellDann Corbit wrote:The single file idea gives 5% at most.OliverUwira wrote:Hmm, I have the feature, and I tried it with all warnings turned on. Zero warnings, so my code is plain and simply slow...Dann Corbit wrote:That is a shame. Maybe it only comes in the expensive versions.Engin wrote:i dont know where this option "analyse" is or this option did not exist on my compiler version.
It is the most valuable feature of the new compiler, in my view.
Also a really nice feature is the built-in profiler.
As for the incredible speed of Crafty. I have no idea as well how that works. Perhaps having only a single source file where includes are ordered according to their usage is making the difference there.
As for incredible speed, what is the thing that you marvel at?
Is it the perft?
Is it the search NPS?

Bob must have squeezed _every_ unneccersary cycle out of his code...
-
- Posts: 1001
- Joined: Mon Jan 05, 2009 7:40 pm
- Location: Germany
- Full name: Engin Üstün
Re: Optimization for speed in VS 2008
that is exactly what i am not understand too, the search NPS of Crafty is very fast, if i look at old versions about 800 KNS normaly, now increased to a speed up of 3x times in 23.x
if i make perft tests i get only about 2x times faster then Tornado, i dont know what the security of the search of Crafty is, or do it count every bean or double count in his source as nodes ?
may be Bob had really good profiled his baby and removed or maked the source code much much better with small time use.
on Tornado takes many times the quick sorting of moves, i dont know how can make this more faster as now is.
if i make perft tests i get only about 2x times faster then Tornado, i dont know what the security of the search of Crafty is, or do it count every bean or double count in his source as nodes ?
may be Bob had really good profiled his baby and removed or maked the source code much much better with small time use.
on Tornado takes many times the quick sorting of moves, i dont know how can make this more faster as now is.
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Optimization for speed in VS 2008
Most programs have a different sort for the root nodes and arbitrary nodes later in the search.Engin wrote:that is exactly what i am not understand too, the search NPS of Crafty is very fast, if i look at old versions about 800 KNS normaly, now increased to a speed up of 3x times in 23.x
if i make perft tests i get only about 2x times faster then Tornado, i dont know what the security of the search of Crafty is, or do it count every bean or double count in his source as nodes ?
may be Bob had really good profiled his baby and removed or maked the source code much much better with small time use.
on Tornado takes many times the quick sorting of moves, i dont know how can make this more faster as now is.
The root nodes get a full and careful qsort(). The arbitrary nodes get a simplified partial sort.