Skip to content

[Variant] Avoid extra allocation in list builder #7977

@klion26

Description

@klion26

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

This issue wants to make improvements for the list builder like #7899 for Object Builder

Describe the solution you'd like

What I would like to do is avoid the extra allocation to improve performance

Describe alternatives you've considered

  1. Change the ListBuilder so it remembers where the list should start in the parent's buffer
  2. Remove ListBuilder::buffer
  3. On append, the ListBuilder writes directly into the parent's buffer
  4. On ListBuilder::finish compute how much space is needed for the offset, and shift the child list bytes down by that amount in the parent's buffer
  5. Fill in the list header + offsets for the child array
  6. return
    Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions