[racket-dev] Implementation of bit vectors
Hi Pierpaolo,
2012/11/27 Pierpaolo Bernardi <olopierpa at gmail.com>:
>> Any comments on the implementation and documentation are welcome.
>> The bit vector is represented as a vector of fixnums (packaged in a
>> struct of course).
>
> I seem to understand that you do not exploit the packed representation
> of bits in the iteration construct, is this right?
In in-bit-vector could be improved. Currently it just calls bit-vector-ref
repeatedly.
> Also, you store and retrieve booleans, not bits, so the name
> 'bit-vector' is misleading.
Potato / Potato :-)
http://wiki.call-cc.org/eggref/4/iset
> 'find' and 'count' operations optimized for the representation would
> be a useful addition.
Good idea. I better rename the current count to size, and
then use count to count ones.
--
Jens Axel Søgaard