Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: eliminating function calls from static evaluation

Author: Dann Corbit

Date: 12:00:17 02/08/99

Go up one level in this thread


On February 08, 1999 at 14:46:31, Stuart Cracraft wrote:
>
>Hi,
>
>I'm thinking of eliminating the majority of function calls
>from the GNU 5.0 static evaluator.
>
>For example, right now, about 12 function calls are used per
>static evaluation of one position.
>
>These function calls are to the individual piece evaluators
>(pawn, knight, etc.) for white and black.
>
>Since this would potentially eliminate an order of 10^3 .. 10^4
>or more function calls per search, before I do the work, I
>want to know what other people's experiences have been.
>
>For example, Crafty has a giant Evaluate () routine wherein
>it looks like individual piece evaluations for each side
>(duplicate code) are enclosed in that giant routine.
GCC is very good at inlining.  Put all the functions above their first use, then
optimize with optimization at max.  You can also use the non-standard inline
keyword, which works with "many" compilers.
Be aware that this may make your code run *SLOWER* depending on a large number
of factors.  The code being much larger may fill the cache and cause a lot more
faults.



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.