[racket-dev] Implementation of bit vectors

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Nov 27 16:15:35 EST 2012

2012/11/27 J. Ian Johnson <ianj at ccs.neu.edu>:
> As I intend to use bitvectors to do fast set operations, and cardinality is a set operation, I wrote up a "fast count bits" function that should be rolled in for the vector implementation:
> https://gist.github.com/4154642

I have used your code to add a function bit-vector-count that count the number
of set bits in the bit-vector.

There is an issue of potential confusion over names though.
In the data collection, the -count suffix normally returns the size of
the data structure.
For vectors the suffix -length is normally used.

Jens Axel Søgaard

Posted on the dev mailing list.