Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Non Recursive Search

Author: Stefano Gemma

Date: 02:01:22 04/17/04

Go up one level in this thread


On April 16, 2004 at 12:31:27, Robert Hyatt wrote:
[...]
>>>>I don't think there is enough difference to measure.  Cray Blitz was
>>>>non-recursive as early Fortran didn't allow recursion.  Crafty has been
>>>>recursive from the start.
>>> Procedure call overhead is _not_ significant on a PC,
>>>compared to all the work done inside one such call.
[...]

In fact, i've changed my main loop in assembly from jumps to recursive calls,
without any loss in n/s. Now i use recursive call to my search procedure but i
don't pass parameters on the stack. This is a mixed approach to non-recursive
search, because i can easly switch to recursive/non-recursive by just adding a
couple of conditional jumps (i call my search from just one point).

We have to consider, as you have written, that the call of the search function
is a very little part of the program. The bottleneck is the move generation (or
very complex evaluation function). We need to generate above 40 moves for every
node. This meens 40*N istruction against just one call istruction per node (and
maybe some push istruction, if you pass parameters on the stack). If you can
generate a single move with about 10 assembly istructions, then you need about
400 istruction per node, for move generation, against one call istruction for
recursive search handle.

With the last Pentium CPU, on Windows, i've noticed that even adding one or two
istruction to any single-move generation don't change the n/s. This means to me
that the manual optimization of assembly is now less important than some year
ago. In C, this is more true... i think.

Ciao!!!

Stefano Gemma



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.