Author: Uri Blass
Date: 22:24:21 10/03/03
Go up one level in this thread
On October 03, 2003 at 21:39:09, Mike Siler wrote:
>Right now, to find out how much time has passed in a search, my program uses a
>function identical to "get_ms()" in TSCP. The function is just:
>
>int get_ms(){
> struct timeb timebuffer;
> ftime(&timebuffer);
> return (timebuffer.time * 1000) + timebuffer.millitm;
>}
>
>I discovered that this fairly slow function seems to be a big bottleneck in my
>program. I'm just wondering what other (C) programs use to get the time more
>quickly.
>
>Michael
I use exactly this function and it is not too slow.
I call it every 8192 nodes and at the end of every iteration(It is possible to
change it based on the speed of the computer or the time control and I read that
Crafty does it based on it but I do not think that it is very important and I
guess that it is possible that get_ms() is going to be faster with faster
computers).
I do not care if my program is 0.2% slower or 1% slower in a computer that is 5
times faster because of get_ms() and I will be surprised if it is more than it
because last time that I profiled it I did not find get_ms() as one of the
functions that takes a lot of time.
Uri
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.