Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Starting to optimize

Author: Matthias Gemuh

Date: 02:50:28 02/29/04

Go up one level in this thread


On February 29, 2004 at 04:07:18, David Mitchell wrote:

>>
>>
>>You have just described my 3-year-old engine, except that mine can SEE.
>>How I wish it could see some good moves.
>>
>>/Matthias
>
>Have you profiled your program, yet? That should give you some good suspects for
>such criminal behavior! ;)
>
>When you step through it, slowly, do you notice calls to functions being
>repeated unnecessarily? For instance, in my program, I have the first function
>check that the game isn't over from the last move that was made. To do that, it
>generates _all_ the moves for the next ply, and checks each move until it finds
>the first legal move.
>
>Now that the game isn't over, it again generates all pseudo legal moves,
>repeating the work it just did. Since it happens pretty fast, it wasn't real
>easy to see that was happening at first.
>
>Before you get into issues of cache efficiency, etc., be sure to check out the
>overall logic loops in the big picture. It's easy for a chess program to hide
>their devious ways. :)
>
>dave




Unfortunately I have no means to profile my unportable Borland C++ Builder code.
It uses the Borland VCL (a component library).
When I overcome my laziness some day, I will cast out VCL and produce
naked profilable C/C++ code for MS Visual C++.

/Matthias.






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.