Skip to content

Add vectorized BinaryPacking int codec#72

Merged
lemire merged 1 commit into
fast-pack:masterfrom
raunaqmorarka:vector-binary-packing
Jun 24, 2026
Merged

Add vectorized BinaryPacking int codec#72
lemire merged 1 commit into
fast-pack:masterfrom
raunaqmorarka:vector-binary-packing

Conversation

@raunaqmorarka

Copy link
Copy Markdown
Contributor

Adds VectorBinaryPacking, a BinaryPacking codec built on the existing Vector API pack/unpack kernels in the vector package. Each block is packed at its own maxbits with no exceptions, and the maxbits computation is vectorized with an OR-reduction over the block.

The codec is wired into BasicTest and SkippableBasicTest alongside VectorFastPFOR, with a dedicated round-trip test covering every lane width.

Benchmark on Graviton4 (Neoverse V2, SVE2 128-bit), full codec round trip vs scalar BinaryPacking over 256K random ints:

  • compress 2.5-3.0x faster across all bit widths
  • decompress 4.0x at low widths, tapering to 2.4x near width 31

Requires --add-modules jdk.incubator.vector, same as VectorFastPFOR.

BinaryPacking using the Vector API pack/unpack kernels: each block is
packed at its own maxbits with no exceptions.

The maxbits computation is vectorized via an OR-reduction over the block.

On Graviton4 (Neoverse V2, SVE2 128-bit), full codec round trip vs
scalar BinaryPacking over 256K random ints: compress 2.5-3.0x faster
across all bit widths; decompress 4.0x at low widths, tapering to
2.4x near width 31.
@lemire lemire merged commit 4d90b1c into fast-pack:master Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants