Optimize batched bit unpacking - #11027
Conversation
|
run benchmark arrow_reader alp arrow_reader_clickbench |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing unpack_batch (284f700) to 8c265f8 (merge-base) diff Run configurationrun benchmark arrow_readerBENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_reader File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing unpack_batch (284f700) to 8c265f8 (merge-base) diff Run configurationrun benchmark alpBENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench alp File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing unpack_batch (284f700) to 8c265f8 (merge-base) diff Run configurationrun benchmark arrow_reader_clickbenchBENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench arrow_reader_clickbench File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: Comparing unpack_batch (284f700) to 8c265f8 (merge-base) diff Run configurationrun benchmark alpCPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: Comparing unpack_batch (284f700) to 8c265f8 (merge-base) diff Run configurationrun benchmark arrow_reader_clickbenchCPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: Comparing unpack_batch (284f700) to 8c265f8 (merge-base) diff Run configurationrun benchmark arrow_readerCPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
Which issue does this PR close?
Rationale for this change
BitReader::get_batchcurrently performs runtime bit-width dispatch for every complete native unpack block. For larger batches, this repeatedly enters the same jump table even though the bit width is constant for the entire call.What changes are included in this PR?
FromBitpacked::unpack_batchesfallback and optimized implementations for the built-in integer, signed integer, and boolean types.This is intentionally limited to unpacking. The related packing work remains separate.
Are these changes tested?
Yes. Existing
get_batchtests exhaustively cover supported bit widths, signed and unsigned integer types, booleans, zero width, and batch sizes including 128 and 129 values that exercise the multi-block path.Validated locally with:
cargo test -p parquet --features experimental --lib(1,374 passed)cargo clippy -p parquet --all-targets --features experimental -- -D warningscargo fmtcheckcargo fmtcheckBenchmark results will be added before this draft is marked ready. Earlier exploratory results were collected from a mixed development branch and are deliberately not attributed to this smaller patch.
Are there any user-facing changes?
No behavior changes are intended.
FromBitpackedgains a provided method, so existing implementations remain source-compatible.