Author: James Swafford
Date: 05:38:29 07/20/99
Go up one level in this thread
On July 19, 1999 at 22:13:02, Dann Corbit wrote:
>On July 19, 1999 at 22:02:22, James Swafford wrote:
>[snip]
>>And here are some numbers from Cygwin B20:
>>
>>   Without Optimizing     -      With Optimizing
>>1.      21000                         21000
>>2.       9300                          9300
>>3.      24900                         33200
>>4.      24800                         36968
>>5.      24904                         38643
>>6.      23199                         36638
>>7.      23885                         37516
>What are the exact command line flags you are using for the compile?
>I do not get results as good as these, but I just use the -O flag.  I must be
>missing something.
>[snip]
Nope, just -O, but instead of compiling each module and linking,
I just added all functions to main.c.
I used the following function for timing:
int NumMilliSecs(void)
{
   struct _timeb tp;
   int t;
  _ftime(&tp);
   t=(tp.time*1000)+tp.millitm;
   return t;
}
And modified think( ) as follows:
void think(void)
{
	int i,j,x,nps;
        int start_time,used_time;
	ply=0;
	nodes=0;
        nps=0;
	memset(history,0,sizeof(history));
	printf("ply      nodes      nps    score  pv\n");
        start_time=NumMilliSecs();
	for(i=1;i<=7;i++) {
		follow_pv=TRUE;
		x=search(-10000,10000,i);
                used_time=NumMilliSecs()-start_time;
                if (used_time<1) used_time=1; // just to avoid div by 0
                nps=nodes*1000/used_time;
		printf("%3d  %9d  %7d    %5d ",i,nodes,nps,x);
		for(j=0;j<pv_length[0];j++)
			printf(" %c%d%c%d",
					FILE(pv[0][j].b.from)+'a',
					8-RANK(pv[0][j].b.from),
					FILE(pv[0][j].b.to)+'a',
					8-RANK(pv[0][j].b.to));
		printf("\n");
	}
}
--
James
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.