Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to do my perft faster without 2 exe files and without doing movei

Author: Uri Blass

Date: 06:53:09 12/25/02

Go up one level in this thread


On December 25, 2002 at 08:57:47, Uri Blass wrote:

>slower?
>
>For the perft command I do not need to give the moves scores for order of moves.
>
>The problem is that I do not know a simple way not to do it without some if
>command
>if takes time and I want to save that time.
>
>I want to tell the computer to do some commands only when it is playing or
>analyzing and not when it calculates perft and I do not want it to calculate the
>if every time.
>
>I thought that #if can help me but it did not help me.
>
>
>Here are the steps that I did before giving up.
>
>
>I tried the following steps:
>
>I added to my code the following lines:
>#define game 1
>
>before the perft command
>I added
>#undef game
>after the perft command
>I added #define game 1
>
>I added
>
>#if defined(game)
>...
>#endif
>
>I found that I have a warning of unreferenced varaibles.
>
>The problem is that the computer does not think that
>the lines after #if defined(game) are part of the code because game is defined
>in a different file that it does not know.
>
>I also tried to put the #define in a different file that has all my defines but
>the problem in that case is that game is always defined probably because the
>#undef is done in different file.
>
>I tried later to put the function that does the perft command in the same file
>of my move generator but again I had problems because it used some functions
>that were defined only in the original file.
>
>
>Uri


I can add that I found a simple way to do it.
I added to my defines
#define game 1
and I added
#if game==1
#endif
to my code.

now the default option is not the fastest in calculating poerft and if I want to
calculate perft fast not for debugging my program I need only to change one
line(changing #define game 1 to #define game 0.

The problem is that a user that does not know the source code and want to
calculate perft fast cannot do it.

I guess that adding the #define does not do the program slower but I do not know
enough about computers to know so please tell me if it does.

I want to support perft in the next version not for debugging my program and if
there is a simple way to do it faster without giving my source code and without
doing my program slightly slower then I want to know it(of course I can release
2 exe files but I do not like this solution).

Uri



This page took 0.01 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.