Author: Paul Byrne
Date: 20:02:35 03/27/00
I just ran into an interesting problem. I've been cleaning up my code lately
and just discovered that my MoveList class still has asserts in it. MoveList
is basically just an array of moves and a counter for now, and adding a Move
is done by
void Add(Move mv) { assert(num<MAX); moves[num++]=mv; }
It has now played over 8000 games, so my choice of MAX seems to be pretty
safe, and I removed the assert.
The resulting program is more than 10% SLOWER, which was rather unexpected.
The only place Add is used is the move generator, so the move generator must
be running much slower to hurt the entire program that much.
I'm using the cygwin compiler.
Anyone have any idea what is happening here?
Thanks
-paul
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.