Skip to content

bench: cover byte-view interleave and compaction workloads - #11346

Draft
sunchao wants to merge 3 commits into
apache:mainfrom
sunchao:codex/byte-view-interleave-benchmarks
Draft

sunchao wants to merge 3 commits into
apache:mainfrom
sunchao:codex/byte-view-interleave-benchmarks

Conversation

@sunchao

@sunchao sunchao commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Benchmark coverage for #7184 and the discussion on #11279; does not close either issue.

Rationale for this change

The existing interleave benchmarks do not isolate the cost of compacting byte views after selection. Reviewing an owned-copy operation also needs controls for repeated source ranges and for sparse selections from arrays with many backing buffers.

This benchmark-only companion to #11279 adds the existing interleave and interleave followed by gc() paths first, as requested by the contributor guide. It changes no kernel implementation and makes no performance improvement claim.

What changes are included in this PR?

Add 42 deterministic workloads to arrow/benches/interleave_kernels.rs: four sources of 8,192 rows, selections of 512 or 8,192 rows, and string lengths of 13-20, 20-60, or 100-400 bytes. Layouts cover unique selections, seeded random selections with replacement, fragmented buffers, repeated indices, shared source ranges, and sliced nullable arrays with inline values.

Six cases within that total keep the source rows and selected values fixed while varying the total number of source buffers from 4 to 4,096 to 32,768, selecting either 3 or 32 rows. Input construction runs outside the measured loop. Both operations return ArrayRef. A shared fixture module lets the proposed compact implementation use identical inputs in #11279.

The byte-view group defaults to 20 samples, 100 ms warmup, and 300 ms measurement per case. It uses a separate Criterion configuration so the pre-existing benchmarks retain their defaults, and explicit command-line timing options can still override the byte-view settings.

Are these changes tested?

On head 0b317f8a56949f4872bfdf4826e779ce5ff9aaf1, based on 705e6405b56cc01efb1c267203d240d0d85804ab, with Rust 1.99.0 and the unchanged repository lockfile:

  • Release benchmark compilation passed.
  • All 84 new Criterion benchmark smoke cases passed.
  • Targeted benchmark Clippy with -D warnings passed.
  • Formatting and diff whitespace checks passed.

Are there any user-facing changes?

No. Benchmark coverage only.

AI assistance: Codex generated the fixtures and benchmark additions, which were source-reviewed and compiled locally.

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Oct 2, 2026
@sunchao
sunchao force-pushed the codex/byte-view-interleave-benchmarks branch from 219ea68 to 09aba9f Compare October 2, 2026 23:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant