[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] What does Analyse Evaluation Speed Do?
From: |
Gary Wong |
Subject: |
Re: [Bug-gnubg] What does Analyse Evaluation Speed Do? |
Date: |
Mon, 20 Jan 2003 21:15:50 -0500 |
User-agent: |
Mutt/1.3.28i |
On Mon, Jan 20, 2003 at 05:19:00PM +0100, Nardy Pillards wrote:
> set priority highest
> 5000
>
> set priority timecritical
> 6100
Oops, that's a bit annoying. The code was supposed to measure elapsed
CPU time, not real time, so that the result would not be influenced by
CPU load, process priority, etc. From clock(3):
} DESCRIPTION
} The clock() function returns an approximation of processor
^^^^^^^^^
} time used by the program.
^^^^
}
} RETURN VALUE
} The value returned is the CPU time used so far as a
^^^^^^^^^
} clock_t; to get the number of seconds used, divide by
} CLOCKS_PER_SEC.
Apparently the C library under MS Windows is measuring something
slightly different (real time, presumably). Under GNU/Linux, the
result seems to be unaffected by external processes. For instance, on
a 1300MHz Celeron, gcc 3.2.1 -O3, two simultaneously running gnubg
processes (one "nice"d, the other not):
Calibrating: 13566 static evaluations/second
Calibrating: 13621 static evaluations/second
which is essentially the same as I get running on an otherwise unloaded
system.
To a first approximation from the results posted so far, it seems that
recent x86 processors handle about 10 evals/sec/MHz, or one evaluation
every 100,000 clock cycles.
Cheers,
Gary.
--
Gary Wong address@hidden http://www.cs.arizona.edu/~gary/