Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Perft 5

Author: Tim Foden

Date: 00:56:33 05/07/03

Go up one level in this thread


On May 06, 2003 at 19:24:23, Magoo wrote:

>After making alot of functions to macros and alot of other stuff, my program is
>much faster!!
>Perft 5 (without evaluating nodes) gives:
>Depth:5, Nodes:5072212, Time:63 sec, Nps:80511, Value:0
>
>But!! I know other programs (i been looking at mscp and faile) do this
>at least 6 times faster, (that is perft 5 < 10sec).
>I've looked at the source for the programs i compare with, especially faile does
>alot of stuff in the move_generator, mine is smaller, maybe a few more if
>statments.
>Now, if i only could figure out why it is so slow, it shouldn't be!!
>
>Flat profile:
>
>Each sample counts as 0.01 seconds.
>  %   cumulative   self              self     total
> time   seconds   seconds    calls   s/call   s/call  name
> 66.51     42.12    42.12  5087588     0.00     0.00  move_generator

>  3.65     56.68     2.31  5087587     0.00     0.00  undo_move
>  3.21     58.71     2.03  5087587     0.00     0.00  do_move

Does your move generate generate all moves in a position in one go, or do you
only generate one move at a time?

If you are generating all moves in one go, then it looks like you are calling
your movegen in the leaf nodes.  You really should have much fewer calls to your
movegen than to your make/unmake move routines.

Cheers, Tim.



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.