Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
-- It will depend on whether you have longish sequences of contiguous ones or zeros.

The one set (of 25 sets) of indexes that I've analyzed, consists of 88 x 31MB vectors. They vary between 86% and 98% sparse (by zero bytes rather than bits).

The largest 0 runs range between 8 and 12 million bits. The largest 1 run is 67 bits. By packing the run counts as 0/1 pairs into 32-bit words, 24-bits for the 0 runs and 8-bits for the one run, I can reduce the size by more 2/3rds and am still able to perform boolean operations with decompressing first.

For the underlying principles see http://crd.lbl.gov/~kewu/ps/LBNL-49626.pdf.


In reply to Re^2: Run length encode a bit vector by Anonymous Monk
in thread Run length encode a bit vector by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-18 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found