Boost logo

Boost :

From: Alex Rosenberg (alexr_at_[hidden])
Date: 2002-06-12 13:37:22


on 6/12/02 9:18 AM, Jeremy Siek at jsiek_at_[hidden] wrote:

> It sounds like you would like to see a class that has both iterators and
> arithmetic operators. I am open to adding iterators (Howard Hinnant also
> made this suggestions), however I have reservations. As I posted
> previously, I think iterators over bits are a bad idea because they are
> inherently slow.

The standard model of iterating over each bit may be slow, but an iteration
model that returned the index of the next set bit could be fast. (c.f.
PowerPC's cntlzw instruction and x86's BSR.)

Such a model might fit better with typical uses of the arithmetic operators
on bitsets.

+------------------------------------------------------------+
| Alexander M. Rosenberg <mailto:alexr@_spies.com> |
| Nobody cares what I say. Remove the underscore to mail me. |


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk