perf: reduce heap allocations using SmallVec for RowView values
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13
- Forks
- 5
- Avg merge
- 1h 49m
- Merged PRs (30d)
- 3
Description
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:
- Add the
smallveccrate toryx-backend. - Modify the
RowViewdefinition and thedecode_rowslogic to useSmallVec. - Run benchmarks to quantify the reduction in allocator pressure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the ryx-backend code by locating the RowView definition and decode_rows logic mentioned in the issue. Check existing dependency and benchmark conventions before introducing SmallVec. Done means small rows avoid heap allocation, behavior remains correct, and benchmarks quantify allocator-pressure changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100