Author: Uri Blass
Date: 03:52:59 12/26/02
Go up one level in this thread
On December 26, 2002 at 06:39:38, Dave Gomboc wrote: >On December 26, 2002 at 05:15:38, Uri Blass wrote: > >>On December 26, 2002 at 04:53:12, Russell Reagan wrote: >> >>>Why did you spend the time to optimize perft? >> >>I am already the fastest in perft and I wanted to be even faster and I decided >>that if it is not a lot of work I am going to do it. >> >>optimizing perft was easy >> >>There are commands that are not needed for calculating perft like calculating >>scores for order of moves so I added >> >>#define GAME 2 >> >>and for things that I do not need I added >>#if GAME==1 >>... >>#endif >> >>If I want to play I change my code to #define GAME 1 >> >>#define GAME 2 gives me warnings but I do not care about them. >> >>The default version has #define GAME 1 >> >>I can add #if GAME==1 in more places and I did not add it in all the places that >>I can do it. >> >>The default version can be used for debugging the move generator and after >>changing one line it can be used for calculating perft faster. >> >>I do not like to be slower in perft and I plan to do changes that may make movei >>slower in perft with the default version so I am going to add in more places >>#if GAME==1 >>... >>#endif >> >>The special version that I used had only 2 and I can add more to do perft even >>faster. >> >>Uri > >How about: > >#define MODE_GAME 1 >#define MODE_PERFT 2 >... > >#define MODE MODE_GAME >(or #define MODE PERFT) >... > >#if MODE != MODE_PERFT > // do tasks that you don't want to happen in perft here >#endif > >This way if you want to add more modes you don't have to rewrite all your #if >statements. > >Dave Thanks for the suggestion I may use it. Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.