Author: Christophe Theron
Date: 17:03:07 10/29/98
Go up one level in this thread
On October 29, 1998 at 18:16:48, Hristo wrote:
>On October 29, 1998 at 14:17:26, James Robertson wrote:
>
>>On October 29, 1998 at 11:41:15, Hristo wrote:
>>
>>>What is the best speed that one can achieve generating moves using bitboards?
>>>Cycles per ply. Not including eval !!! :))
>>>For instance, in very good(middle game...where the pieces are mopved arround)
>>>conditions my program can generate 1 ply every 21.7 cycles. This includes all
>>>attacks and all squares possible to get to.
>>>
>>>best regrads.
>>>hristo
>>
>>This may be a dumb question, but how do you measure cycles?
>>
>>James
>
>run a function, GenerateMoves(), 1000000 times in a loop.Calculate the time(T)
>it took to execute the loop. Store the total number of moves(tM) generated for
>*this* time.
>You also know the base speed of your CPU, perhaps 450Mhz, so you use that to
>calculate CyclesPerMove = CPU/(tM/T)... this a very simple way of doing it but
>it is probably just as good as any!
>hristo
You can do much better. If you are using a Pentium or compatible processor, you
have a register that counts the machine cycles! Just compute the difference of
the value of this register before and after your 1000 GenerateMoves(), and
divide by 1000.
NOTE: I have never used this register, but you can find papers about it in Dr
Dobb's Journal for example.
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.