next up previous contents
Next: 5.10.6 Hashtables Up: 5.10 Object Representation Previous: 5.10.4 Vectors

Bit-Vectors

 

Another thing that lists have been used for is set manipulation. In applications where there is a known, reasonably small universe of items bit-vectors can be used to improve performance. This is much less convenient than using lists, because instead of symbols, each element in the universe must be assigned a numeric index into the bit vector. Using a bit-vector will nearly always be faster, and can be tremendously faster if the number of elements in the set is not small. The logical operations on simple-bit-vectors are efficient, since they operate on a word at a time.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997