perf: improve performance of encoding GenericByteArray by 8%#9054
Conversation
GenericByteArray by 15%-20%GenericByteArray by 8%
|
Waiting for to run row format benchmark |
|
run benchmark row_format |
|
🤖 |
arrow-row/src/variable.rs
Outdated
| .zip(null_buffer.iter()) | ||
| .map(|(start_end, is_valid)| { | ||
| if is_valid { | ||
| Some(&bytes[start_end[0].as_usize()..start_end[1].as_usize()]) |
There was a problem hiding this comment.
it might also be worth trying bytes.get_unchecked(...) here to skip the bounds checks if it helps
The input array has been validated so it is safe to assume the offsets are in range
|
🤖: Benchmark completed Details
|
… chance for skipping the encode null for non nullable
|
run benchmark row_format |
|
🤖 |
|
🤖: Benchmark completed Details
|
|
Looks like an improvement to me when converting strings (though the benchmarks are noisy) |
|
Thanks @rluvaton |
Which issue does this PR close?
N/A
Rationale for this change
Make row conversion faster
What changes are included in this PR?
created "manual" iterator over the byte array and offsets with optimizations for no nulls
Are these changes tested?
Existing tests
Are there any user-facing changes?
No