Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Anyone used std::bitset?

Author: Bo Persson

Date: 12:00:09 08/06/02

Go up one level in this thread


On August 04, 2002 at 13:38:50, Russell Reagan wrote:

>On August 04, 2002 at 07:14:09, Bo Persson wrote:
>
>>You might use it as a starting point ("inspiration") for a bitset<64> class.
>
>Do you mean that I should try and create my own bitset template class and make
>it optimized for multiples of 32-bit widths?

Or, you don't need to have it templated at all if you *know* that you will
always use 64 bits. This simplifies some coding, as you don't have to loop over
Bits/sizeof(long) elements, beacuse you *know* that 2 unsigned long is enough.
And you don't have to mask off any excess bits, like for bitset<63>, or
bitset<65>.

That will probably save you some time! Running-time, that is. Not coding time.
:-)


Bo Persson
bop2@telia.com



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.