Computer Chess Club Archives


Search

Terms

Messages

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

Author: Jeremiah Penery

Date: 14:19:30 12/25/02

Go up one level in this thread


On December 25, 2002 at 15:37:04, Dave Gomboc wrote:

>On December 25, 2002 at 12:27:47, Jeremiah Penery wrote:
>
>>On December 25, 2002 at 11:18:54, Uri Blass wrote:
>>
>>>I guess that releasing 2 exe file when one file is not supposed to be used for
>>>playing is the most simple solution (using #define game c when c is from a text
>>>file is better but I do not know if it is possible).
>>>
>>>Uri
>>
>>#define shouldn't work in that way, because it is only used in the compiler
>>preprocessor
>>
>>I think the easiest way would be to just copy your functions (gen, makemove,
>>undomove - whichever calculates the stuff that perft doesn't need) and remove
>>the extra stuff.  So you have gen(), perft_gen(), makemove(), perft_makemove(),
>>etc.  Then when you do perft, just call the appropriate one.
>
>Ugh.  Uri's learning to program, don't teach him cut-and-paste!  It's the
>easiest method, and also the worst. :-(
>
>Dave

Well, he wants the same move generation functions, minus some move ordering
calculations.  He doesn't want to use 'if' clauses to do it, because they add
instructions (supposedly slowing the program down).  How else would you suggest
to do it simply, other than cut/paste?  Note that his current solution (separate
exe files, one for games and one for perft) is cut-and-paste of the entire
program, not just a couple functions. :)

But, now that I think about it, Uri really should try just using simple 'if'
clauses.  The branch predictor should be almost perfectly accurate there,
meaning that there will be negligible speed loss due to extra comparisons.



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.