perf(parquet): Optimize DeltaByteArrayEncoder and friends - #10412
perf(parquet): Optimize DeltaByteArrayEncoder and friends#10412MassivePizza wants to merge 12 commits into
Conversation
|
run benchmark arrow_writer |
This comment was marked as duplicate.
This comment was marked as duplicate.
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
That bench sure looks noisy. I'm not sure which benches actually use DeltaByteArray encoding, but parquet_2 should generally enable it for byte arrays (i.e. decimals and strings) AFAIK. I'll test again locally to make sure nothing is too broken. |
|
@MassivePizza I'm having issues with flaky benches on #10432 too. Maybe we should focus on pushing #9975 forward? |
|
run benchmark parquet_round_trip env:
BENCH_FILTER: delta |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing optimize-delta-byte-array-encoder (cbc8cad) to 4f96226 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
run benchmark parquet_round_trip env:
BENCH_FILTER: byte_stream |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing optimize-delta-byte-array-encoder (cbc8cad) to 4f96226 (merge-base) diff File an issue against this benchmark runner |
Which issue does this PR close?
N/A
Rationale for this change
In our case, improve performance for delta-encoded decimals.
What changes are included in this PR?
Reduce allocs and copies when delta-encoding byte-arrays.
Also removed some suspicious
#[cold]attributes onEncoder::encoding.Are these changes tested?
Encoder correctness should be covered by existing tests.
I can add benchmarks if desired, since the removal of byte array copies is a nice win (especially combined with #10364).
Are there any user-facing changes?
parquet::encodings::encoding::Encoderhas a newflush_tofunction, but the module is gated behind the experimental feature. I can rewrite it to makeflush_toa default method if needed.