Function Speed
Posted: 09 Jan 2008, 21:49
I haven't been on in a while, and I am still having trouble with my engine speed.
I have written a calculate preft function and I am using it with another chess program called Roce. This way I can check to see if my numbers are correct.
When I run perft from the starting position with a depth of 3 ply it takes my program 1.8 seconds to run. This is really high I imagine. Roce only takes 0.016 seconds, so I must be doing something really wrong. (I am not sure if 3 ply is correct so I want to clarify: white moves, black moves, then white moves again).
99% of the time perft is running it is waiting for the function GetAllLegalMoves to return
on average GetAllLegalMoves takes 199 microseconds to run.
GetAllLegalMoves simply calls two functions: GetAllMoves, and RemoveIllegalMoves.
Get All Moves is running 17% of the time and takes an average of 35 microseconds each time it runs.
Remove Illegal Moves is running 81% of the time and takes an average of 164 microseconds to run.
I was wondering if anyone can compare these numbers to their engines and let me know if anything is out of the ordinary.
I noticed that each function also will occasionally take 16 milliseconds to run (no matter how short the function is). I am assuming this is when my program loses the cpu for a moment.
I have written a calculate preft function and I am using it with another chess program called Roce. This way I can check to see if my numbers are correct.
When I run perft from the starting position with a depth of 3 ply it takes my program 1.8 seconds to run. This is really high I imagine. Roce only takes 0.016 seconds, so I must be doing something really wrong. (I am not sure if 3 ply is correct so I want to clarify: white moves, black moves, then white moves again).
99% of the time perft is running it is waiting for the function GetAllLegalMoves to return
on average GetAllLegalMoves takes 199 microseconds to run.
GetAllLegalMoves simply calls two functions: GetAllMoves, and RemoveIllegalMoves.
Get All Moves is running 17% of the time and takes an average of 35 microseconds each time it runs.
Remove Illegal Moves is running 81% of the time and takes an average of 164 microseconds to run.
I was wondering if anyone can compare these numbers to their engines and let me know if anything is out of the ordinary.
I noticed that each function also will occasionally take 16 milliseconds to run (no matter how short the function is). I am assuming this is when my program loses the cpu for a moment.