Repository navigation
Conversation
6ada699 to
e780ee8
Compare
Merging this PR will degrade performance by 11.59%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | bitpack_blocked_compress_avx2 |
6.7 µs | 7.6 µs | -11.59% |
| 🆕 | WallTime | bitpack_blocked_decompress_avx512[u32] |
N/A | 9.4 µs | N/A |
| 🆕 | WallTime | bitpack_blocked_decompress_avx512[u64] |
N/A | 18.9 µs | N/A |
| 🆕 | WallTime | bitpack_blocked_decompress_avx2[u32] |
N/A | 10.8 µs | N/A |
| 🆕 | WallTime | bitpack_blocked_decompress_avx2[u64] |
N/A | 21.2 µs | N/A |
| 🆕 | WallTime | bitpack_blocked_decompress_neon[u32] |
N/A | 13.8 µs | N/A |
| 🆕 | WallTime | bitpack_blocked_decompress_neon[u64] |
N/A | 29.3 µs | N/A |
| Simulation | bench_compare_primitive[(10000, 2)] |
< 1 ns | < 1 ns | N/A | |
| Simulation | bench_compare_sliced_dict_primitive[(3333, 10000)] |
< 1 ns | < 1 ns | N/A |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/bitpacked-variable-decode (75fe6ef) with develop (c901cf7)
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. ↩
957cefe to
67da367
Compare
b6f53eb to
c70f089
Compare
760be2a to
656dea8
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>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
656dea8 to
0fdbb09
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>
| output: &mut [MaybeUninit<T>], | ||
| ) { | ||
| let packed = array.packed_slice::<T::Physical>(); | ||
| let mut scratch = [const { MaybeUninit::<T>::uninit() }; FL_CHUNK_SIZE]; |
There was a problem hiding this comment.
Do we do the same in unblocked?
|
|
||
| decode_blocks(array, &offsets, uninit_slice); | ||
|
|
||
| if let Some(patches) = array.patches() { | ||
| apply_patches_to_uninit_range(&mut uninit_range, &patches, ctx, |v: T| v)?; | ||
| } |
There was a problem hiding this comment.
you want overlap patches and blocks
There was a problem hiding this comment.
this is what global does as well, can have as a followup pr
| } | ||
|
|
||
| /// Decode the blocks between validated `offsets` into `output`. | ||
| fn decode_blocks<T: BitPackedUnpack>( |
There was a problem hiding this comment.
how is the offset metadata considered here (if you are sliced say 9 values into a block)
There was a problem hiding this comment.
for first block we unpack into scratch buffer but only copy scratch[offset..]
Tracking Issue: #10167
Summary
Adds support for decoding
BitPackedarrays with blocked bitwidths.Now each public function that decodes bitpacked arrays with global bitwidths has a version for blocked bitwidths.
unpack_array(array, ctx)unpack_array_blocked(array, offsets, ctx)unpack_primitive_arrayunpack_primitive_array_blockedunpack_into_primitive_builderunpack_into_primitive_builder_blockedunpack_single(array, index)unpack_single_blocked(array, offsets, index, ctx)Callers choose between them by matching on
bit_widths().There is no blocked
unpack_map_into_builder: its only caller, the wideningCastKernel, declines blocked arrays, so the mapped path would only run in tests.Design
#10004 only checks block boundary values in debug builds, so the decoder checks them itself:
u64and executes it once, checks that it holds one boundary per block plus a trailing one, and validates every boundary before writing to the builder. A single offset type keeps one copy of the block loop per value type, for 8 bytes per 1024 values. Each block must be a whole number of 128-byte rows, no wider than the array's type, and the boundaries must span the packed buffer.scalar_atreads only the selected block's boundaries, directly for host primitive offsets and throughexecute_scalarotherwise, and validates just that block.Both use
block_rangeinbitpacking/array/mod.rs, whichvalidate_primitive_offsetsnow also uses. Boundaries are relative to the first one, which may be nonzero.Full blocks unpack straight into the output, like the global decoder's full chunks. A partial first or last block unpacks into one 1024-value scratch block.