Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about speed of big programs

Author: Christophe Theron

Date: 10:57:32 09/14/03

Go up one level in this thread


On September 14, 2003 at 12:03:44, Uri Blass wrote:

>On September 14, 2003 at 10:59:43, Ferdinand S. Mosca wrote:
>
>>On September 14, 2003 at 09:28:07, Uri Blass wrote:
>>
>>>I know that usually top programs do not evaluate a lot of special cases about
>>>endgames like situation of theoretical draw of KRPPP vs KRPP when the pawns are
>>>in the same side
>>>
>>>My question is if except having more important things to do there is a speed
>>>reason for programmers not to have big code for rare cases when calculating if
>>>the rare cases happen is cheap but calculating the evaluation is not cheap?
>>
>>Hello Uri, Will you simplify your question above?
>
>My question is if increasing the size of a chess program can reduce its speed.
>
>I assume for the discussion that
>99% of the program is almost never done.
>
>Suppose that a programmer writes long code for a lot of special cases about
>specific endgames.
>
>Assume that detecting that you are not in one of the special cases is cheap.
>
>Can writing the long code reduce the speed of the program significantly even in
>case that the program almost never get the special cases in the search?
>
>Uri



The long code section will almost not reduce the speed of the program because it
is almost never executed.

I would advise you to put this almost-never-used code in a different source code
than the very-often-used parts of your chess engine.

This will help the compiler to produce code that is geographically organized:
for the L1 and L2 cache of your processor it is better when the code that is
executed often is not broken in several parts.

It is also better if the total size of that code is well below the size of the
L1 cache of your processor. If it is, then it will be able to stay in L1 cache
most of the time.

If the data that is used by this "engine core" can also fit in the L1 cache you
will get the best performances.



    Christophe



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.