Skip to content

perf: reduce heap allocations using SmallVec for RowView values #55

@Einswilli

Description

@Einswilli

Ryx targets 1-5 microseconds overhead. Currently, RowView stores row values in a Vec, which always allocates on the heap. For queries with a small number of columns (the majority of cases), this is unnecessary overhead.

Goal: Replace Vec<T> with SmallVec<[T; N]> in the RowView structure to enable stack allocation for rows with up to N columns.

Implementation hint:

  1. Add the smallvec crate to ryx-backend.
  2. Modify the RowView definition and the decode_rows logic to use SmallVec.
  3. Run benchmarks to quantify the reduction in allocator pressure.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions