Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bit counting revisited

Author: Flemming Rodler

Date: 10:43:30 04/20/00

Go up one level in this thread


On April 20, 2000 at 12:46:19, KarinsDad wrote:

>I have a question on your statistics.
>
>Did you enter in ALL combinations of bit patterns x number of times for your
>test, or did you enter in set bit patterns x number of times, or did you enter
>in random bit patterns x number of times?
>
>KarinsDad :)


I used the pattern 2^N-1 for N bits set so it is fixed. It should not matter if
the bits are ialways the same or at random positions. The number of intructions
performed  in the first algorithm is only depedent on N and not the location of
the 1-bits. The 3 other algorithms are constant regardless of input. Just to
verify that there where no subtle differences in the time of the performed
maschine code instructions depepending on the input I also ran some tests with
random bits and the results were the same. Running ALL combinations of bit
patterns is infeasable - else chess whould have been solved already :-)

Best regards
Flemming

PS: I still hope someone can show me how to inline assembler under gcc.



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.