cakeni opened a new pull request, #10640:
URL: https://github.com/apache/arrow-rs/pull/10640

   # Which issue does this PR close?
   
   - Closes #10621.
   
   # Rationale for this change
   
   Finalizing VariantArrayBuilder replayed every offset through 
BinaryViewBuilder::try_append_view, repeating bounds and value validation for 
buffers and offsets produced internally by the Variant builders.
   
   # What changes are included in this PR?
   
   - Add a focused Criterion benchmark that times only build() for 262,144 
small values.
   - Construct views directly from the recorded offset slices.
   - Build the final BinaryViewArray from those validated views, with the 
safety invariants documented at the unchecked constructor.
   
   # Are these changes tested?
   
   - cargo +stable-x86_64-pc-windows-gnu test -p parquet-variant-compute --lib 
(347 passed)
   - cargo +stable-x86_64-pc-windows-gnu bench -p parquet-variant-compute 
--bench variant_kernels -- variant_array_builder_build_262k_small_values 
--noplot
     - Before: [2.9213 ms, 2.9390 ms, 2.9577 ms]
     - After: [2.0393 ms, 2.0538 ms, 2.0689 ms]
     - Criterion change: [-30.816%, -30.118%, -29.428%], p = 0.00
   - cargo fmt --all -- --check
   - git diff --check
   
   # Are there any user-facing changes?
   
   No API or behavior changes. VariantArrayBuilder::build is approximately 30% 
faster in the focused many-small-values benchmark.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to