Skip to content

[Variant] Benchmark and optimize BinaryView construction in VariantArrayBuilder #10621

Closed

Description

@sdf-jkl

Is your feature request related to a problem or challenge?

VariantArrayBuilder::build converts accumulated buffers and offsets into BinaryViewArrays 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

Activity

  1. cakeni commented on Aug 11, 2026

    @cakeni
    Contributor

    I'd like to work on this. I'll first add a focused build benchmark, measure the baseline, and only optimize if the finalization cost is material.

  2. cakeni commented on Aug 11, 2026

    @cakeni
    Contributor

    take

  3. sdf-jkl commented on Aug 12, 2026

    @sdf-jkl
    MemberAuthor

    thanks @cakeni, I'll take a look at all of your PRs

  4. added a commit that references this issue on Aug 22, 2026
    1535dc4
  5. added 3 commits that reference this issue on Aug 26, 2026
    1970ab5
    8f0a79a
    309616e
  6. added 3 commits that reference this issue on Sep 18, 2026
    9603876
    ce73e43
    1b028fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions