Skip to content

[Epic] Replace OffsetBufferBuilder / BufferBuilder usage with Vec, when possible #10245

Description

@alamb

Is your feature request related to a problem or challenge?

As @Jefffrey has observed in #10229 (comment), switching from OffsetBufferBuilder / BufferBuilder to use Vec<..> often results in a non trivial speedup.

This is likely because the Rust language has a highly optimized Vec implementation

Describe the solution you'd like

Basically try and change any code like this

    let mut values = BufferBuilder::<T::Native>::new(len);

To use

let mut values = Vec<T::Native>::with_capacity(len);

And various equivalent

Note to contributors:

please make targeted PRs (that change one or two usages each) to keep the PRs easy to review and thus fast to merge

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions