HackerPapers

arXiv:1503.07387cs.IR

Vectorized VByte Decoding

Jeff Plaisance, Nathan Kurz, Daniel Lemire

Abstract

We consider the ubiquitous technique of VByte compression, which represents each integer as a variable length sequence of bytes. The low 7 bits of each byte encode a portion of the integer, and the high bit of each byte is reserved as a continuation flag. This flag is set to 1 for all bytes except the last, and the decoding of each integer is complete when a byte with a high bit of 0 is encountered. VByte decoding can be a performance bottleneck especially when the unpredictable lengths of the encoded integers cause frequent branch mispredictions. Previous attempts to accelerate VByte decoding using SIMD vector instructions have been disappointing, prodding search engines such as Google to use more complicated but faster-to-decode formats for performance-critical code. Our decoder (Masked VByte) is 2 to 4 times faster than a conventional scalar VByte decoder, making the format once again competitive with regard to speed.

arXiv comments
First International Symposium on Web Algorithms (June 2015)
Journal reference
DOI
Subjects
cs.IRInformation Retrieval

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Mar 2016 to May 2026.

Comments linking this paper, per year.

Discussed in comments2 threads

    • I researched many different varint encodings for a GraphQL-specific binary format (resulting in Argo: https://github.com/msolomon/argo ). I ended up choosing protobuf-style zig-zag varints, but I also found these interesting: vu128…

      arkenflameView on HNParent context

    • The 'PDF' link at the bottom is for the old version of the paper. The current version (v2) is available here: http://arxiv.org/abs/1503.07387

      jcrView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.