Author: Flemming Rodler

Date: 19:44:25 04/18/00

Hi, I am trying to implement a bitboard based chess program on a Pentium or AMD computer. I need to be able to find the following information fast: 1) The position of the first and/or last bit in a sequence of 64 bits. 2) Count the number of bits that are 1 in a sequence of 64 bits. I know there is a method that works linear in the number of on-bits for problem 2: for(count = 0; bitboard; count++, bitboard &= (bitboard -1)); Is there anything faster, ie. such lookuptables or machine code intrutions? What about problem 1? Thanks in advance for any reply Flemming

- Re: fast bit counting
**Ernst A. Heinz***08:02:52 04/19/00*- Bitcount explained
**Oliver Roese***19:04:54 04/19/00*- Re: Bitcount explained
**Bo Persson***05:48:14 04/21/00*- Re: Bitcount explained
**Oliver Roese***03:23:50 04/24/00*- Re: Bitcount explained
**Bo Persson***07:46:17 04/24/00*

- Re: Bitcount explained

- Re: Bitcount explained

- Re: Bitcount explained

- Bitcount explained
- Re: fast bit counting
**Brian Richardson***06:52:00 04/19/00* - Re: fast bit counting
**Jeremiah Penery***02:41:00 04/19/00* - Re: fast bit counting
**Steve Maughan***01:02:17 04/19/00* - Re: fast bit counting
**Dan Newman***00:27:16 04/19/00*- Re: fast bit counting
**Tony Werten***01:31:48 04/19/00*- Re: fast bit counting
**Dan Newman***11:13:05 04/19/00*- Re: fast bit counting
**Bo Persson***11:21:45 04/19/00*

- Re: fast bit counting
- Re: fast bit counting
**Steve Maughan***05:23:48 04/19/00*- Re: fast bit counting
**Tony Werten***05:42:12 04/19/00*

- Re: fast bit counting

- Re: fast bit counting
- Re: fast bit counting
**Dan Newman***00:37:59 04/19/00*

- Re: fast bit counting
- Re: fast bit counting
**Dann Corbit***20:39:31 04/18/00*- Re: fast bit counting
**Dan Newman***11:32:33 04/19/00*- Re: fast bit counting
**Heiner Marxen***12:01:10 04/19/00*- Re: fast bit counting
**Dan Newman***13:24:18 04/19/00*

- Re: fast bit counting

- Re: fast bit counting

- Re: fast bit counting
- Re: fast bit counting
**Tom Kerrigan***20:12:32 04/18/00*

This page took 0.05 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.