Some time ago there was some discussion about bit vectors. Perhaps someone may find something worth copying here. Steffen Beyer wrote: > http://www.perl.com/CPAN/authors/id/S/ST/STBEY/ .... > > What's new in version 6.0: > -------------------------- > > + Splitted the Vector.pm module; separated XS and overloaded Perl > part for improved performance (reduces loading time for XS part). > (See also benchmark.pl in subdirectory "examples".) > + Corrected the handling of numerical overflow in arithmetic methods > ("add()", "subtract()", "Multiply()", "from_Dec()", "new_Dec()"). > + Methods "add()" and "subtract()" now return the carry as well as > the overflow flag if called in list context (only the carry in > scalar context, as before). > + Added two new methods "inc()" and "dec()", which return the overflow > flag (whereas "increment()" and "decrement()" return the carry flag). > The new methods also allow to copy-and-increment/decrement in addition > to in-place operation. > + Methods "from_Dec()" and "new_Dec()" now allow you to enter large > positive numbers which will have the MSB set (this was forbidden > previously because these numbers are considered to be negative in > two's complement binary representation). > > Abstract: > --------- > > Bit::Vector is an efficient C library which allows you to handle > bit vectors, sets (of integers), "big integer arithmetic" (e.g. > for cryptography) and boolean matrices, all of arbitrary sizes. > > The library is efficient (in terms of algorithmical complexity) > and therefore fast (in terms of execution speed) for instance > through the widespread use of divide-and-conquer algorithms. > > The package also includes an object-oriented Perl module for > accessing the C library from Perl, and features overloaded > operators for maximum ease of use. > > The C library can nevertheless be used stand-alone, without Perl. .... Conrad Schneiker (This note is unofficial and subject to improvement without notice.)