Computer Chess Club Archives


Search

Terms

Messages

Subject: is the "dead bit" a good idea?

Author: Tom Kerrigan

Date: 23:53:44 07/19/98


A handful of people are using linked lists to keep track of pieces, and they
delete (capture) a piece by setting a "dead bit" in the linked list record.

This seems like a good idea because the amount of work required to
remove/restore an element is basically nil.

On the other hand, every time you want to loop through pieces, you need to check
the dead bits, and that isn't free.

So anyway, I reworked a copy of Stobor so it would actually remove a piece from
the linked list when it was captured. Overall NPS increased by 4% and in no
position did the copy run slower than the original. I use a SEE, too, so the
pieces were inserted in order. Without this restriction, the copy would have
been even faster.

Any comments/questions/results from your own program are appreciated. :)

Cheers,
Tom



This page took 0.03 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.