Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread Pierpaolo Bernardi
On Sat, Nov 24, 2012 at 8:33 PM, Jens Axel Søgaard jensa...@soegaard.net wrote: Hi All, I have written an implementation of bit vectors intended to be part of the data collection. https://github.com/plt/racket/pull/176 Any comments on the implementation and documentation are welcome.

Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread Jens Axel Søgaard
Hi Pierpaolo, 2012/11/27 Pierpaolo Bernardi olopie...@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

Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread Pierpaolo Bernardi
Hi, On Tue, Nov 27, 2012 at 2:34 PM, Jens Axel Søgaard jensa...@soegaard.net wrote: Hi Pierpaolo, 2012/11/27 Pierpaolo Bernardi olopie...@gmail.com: Also, you store and retrieve booleans, not bits, so the name 'bit-vector' is misleading. Potato / Potato :-)

Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread Matthew Flatt
Nicely done. I've merged with minor changes, including renaming `bit-vector-count' to `bit-vector-length' to be more consistent with `vector' functions. At Sat, 24 Nov 2012 20:33:12 +0100, Jens Axel Søgaard wrote: Hi All, I have written an implementation of bit vectors intended to be part of

Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread J. Ian Johnson
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 It depends on the fixnum representation, so I don't imagine this being

Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread Jens Axel Søgaard
2012/11/27 J. Ian Johnson i...@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

Re: [racket-dev] Implementation of bit vectors

2012-11-27 Thread Sam Tobin-Hochstadt
On Tue, Nov 27, 2012 at 1:15 PM, Jens Axel Søgaard jensa...@soegaard.net wrote: 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. The name