sdf-jkl opened a new issue, #10621:
URL: https://github.com/apache/arrow-rs/issues/10621

   ### Is your feature request related to a problem or challenge?
   
   `VariantArrayBuilder::build` converts accumulated buffers and offsets into 
`BinaryViewArray`s by replaying every offset through 
`BinaryViewBuilder::try_append_view`.
   
   A TODO suggests constructing the views directly would be faster, but the 
existing benchmarks combine this work with JSON traversal and Variant encoding. 
There is no benchmark showing how much time this finalization step consumes.
   
   ### Describe the solution you'd like
   
   First add a targeted benchmark that isolates `VariantArrayBuilder::build` 
for large arrays, particularly many small Variant values where per-view 
overhead is likely visible.
   
   Use that benchmark to establish a baseline. If the finalization cost is 
material, construct the views during append or build the final view buffer 
directly, and report the measured improvement.
   
   ### Additional context
   
   - Existing benchmarks: 
https://github.com/apache/arrow-rs/blob/main/parquet-variant-compute/benches/variant_kernels.rs
   - Current TODO: 
https://github.com/apache/arrow-rs/blob/main/parquet-variant-compute/src/variant_array_builder.rs#L467


-- 
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