Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: program performence timing question

Author: Leen Ammeraal

Date: 10:03:33 01/23/02

Go up one level in this thread


If it is a matter of implementing the same algorithm
in several equivalent ways, out of which you want to
choose the fastest, consider this way:
take some positions, such as wac141.epd, for which
your program uses quite some time, say, 50 s., and
use epd2wb to see which implementation is the fastest.
Of course, for each implementation you build a
separate executable. I do this quite a lot to
make my program faster. An example is several
versions of the function popCount to count the number of bits in
an __int64, which is important in programs based
on the bitboards.
Leen



On January 23, 2002 at 08:39:53, JW de Kort wrote:

>Hi!
>
>Last week i decided it was time to speed up my evaluation function. In order to
>do so i inserted some code to keep  track of the time spend in various parts of
>the evaluation function. Somthing like:
>
>int timeused []
>
>
>eval()
>{
>  timeused[total]-=clock();
>
>   timeuses[part1] -=clock
>
>    // do some evaluation
>
>    timeused[part]+=clock();
>
>   timeuse [part2] -= clock();
>   // do some other evaluation
>  tumeuse [part2]-=clock();
>
>   timeuse[total]+=clock();
>}
>
>
>Then i evaluated the time spend in the various parts. This was very
>disappointing: after 10 runs of the same number evaluations each run jused a
>different amount of time and the time spend in the various parts of the
>evaluation also different, not only in time used but also in time used as a
>percentage of the total time spend evaluating. These difference where not small
>but rather large. In one word: useless!
>
>Can anybody explain this behaviour? And is there a better way to time?
>
>Thanks in advance
>
>Jan WIllem



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.