Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Which engines support 64 bit node counter?

Author: Dieter Buerssner

Date: 10:22:09 05/18/03

Go up one level in this thread


On May 17, 2003 at 15:07:35, Sune Fischer wrote:

>>  printf("%2d %10lu %s\n", depth, nodes, pv);
>
>You can try
>
>printf("%2d %.0f %s\n", depth, (double)nodes, pv);
>
>Should be just fine for simple node counters?

Yes. I actually did this in my experiment, but I don't like it very much. One
reason is, that many printf library functions are not very reliable for printing
doubles (the number is of course always basically correct, but not always up to
the last digit). This could make it difficult to compare node counts with
different environments, which I find very useful for a first test. For example
when I compile a version for Linux. Then, MSVC does not support the cast from
unsigned __int64 to double. So one has to use the signed form.

>I think this problem is soon to be extinct with the new 64 bit chips comming,
>but one solution for now might be to use two counters.
>One 32 bit to increment at every node, and one double that keeps the total
>count.
>You can flush the 32 bit counter once and a while, e.g. when you check for
>timeout or something.
>
>totalnodes += (double)nodes;
>nodes = 0;

I think, one does not need to do this. There is obviously not much of a speed
problem in just adding one to a counter anyway. Unless one wants to support some
really old platforms, 64-bit types are available, as well as reliable floating
point arithmetics. Just using double for nodes would be enough with one counter
and less work.

Regards,
Dieter



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.