Repository navigation
Conversation
Merging this PR will improve performance by 12.31%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | bitpack_blocked_compress_avx2 |
7.6 µs | 6.8 µs | +12.31% |
| Simulation | bench_compare_primitive[(10000, 2)] |
< 1 ns | < 1 ns | N/A |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/bitpacked-v2-wire (fc9ce15) with mk/bitpacked-variable-decode (6be7533)
Footnotes
-
409 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
336bbfc to
f0f7854
Compare
d9b037e to
d4b2926
Compare
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
d4b2926 to
fc9ce15
Compare
Tracking Issue: #10167
Summary
Adds a wire format for
BitPackedarrays whose blocks each have their own bit width, and makes it the in-memory ID, followingfastlanes.for.v2(#10135) andDecimalByteParts.fastlanes.bitpackedfastlanes.bitpacked.v2BitPackedPlugindeclares both serialized IDs and picks one per array frombit_widths():fastlanes.bitpackedexactly as before. Existing files read as before, and default writes stay byte-identical.fastlanes.bitpacked.v2.The plugin moves into
bitpacking/plugin/, laid out like FoR's:mod.rsholds the IDs and the dispatch,v1.rsthe v1 metadata and serde,v2.rsthe new format, andtests.rsthe existing tests plus new ones. The v1 code is moved unchanged, except that it writesbitpacked_v1_id()rather than the plugin's ID.fastlanes.bitpacked.v2layoutoffset, the block offsets' unsignedPType, and the patches metadata. There is no bit width, and the block offsets' length,ceil((offset + len) / 1024) + 1, is derived.Deserialization checks for one buffer and the expected number of children, and validates the offset before deriving the block offsets' length. Construction then checks the block offsets' dtype and length. The decoder (#10202) bounds-checks the boundary values themselves.
BitPackedPatchedPluginThe experimental-patches plugin declares both IDs as well. It moves a v2 array's interior patches into a
Patchedwrapper just as it does for v1, rebuilding the inner array with its block offsets instead of panicking on a blocked array.Editions and compressor
fastlanes.bitpacked.v2is in no edition. Writers that enforce editions reject it, and readers that predate it report an unknown encoding. Nothing produces blocked arrays yet, so default writes don't change.BitPackingScheme::produced_encodingsnow declaresbitpacked_v1_id(), sinceBitPacked.id()is the in-memory ID.