Skip to content

feat(array): add probe_scalar to OperationsVTable with a ProbeState shell - #9892

Closed
joseph-isaacs wants to merge 1 commit into
developfrom
ji/probe-vtable-hook
Closed

joseph-isaacs wants to merge 1 commit into
developfrom
ji/probe-vtable-hook

Conversation

@joseph-isaacs

Copy link
Copy Markdown
Contributor

The mechanical half of the scalar-probe API, split out so the probe work itself (stacked on this) can be reviewed on its own.

What

  • OperationsVTable gains type ProbeState: Default + 'static, the state an encoding may keep across repeated reads, and probe_scalar(state: &mut ProbeState<'_, V>, index, ctx), defaulting to scalar_at. No encoding changes behaviour.
  • ProbeState<'_, V> for now only carries the ArrayView. The erased dispatch routes one-off reads through it.
  • Every encoding declares type ProbeState = () (44 files, one line each).
  • scalar_at stays until encodings migrate.

Checks

  • cargo +nightly fmt --all -- --check: clean
  • cargo clippy -p vortex-array --all-targets --all-features: clean
  • cargo nextest run -p vortex-array --cargo-profile bench --no-fail-fast: passes apart from the two listview should_panic tests that cannot pass in the bench profile (pre-existing)
  • Doctests for vortex-array: pass
  • cargo build --workspace (excluding CUDA crates): passes

🤖 Generated with Claude Code

…hell

Adds the vtable hook the scalar probe API builds on, without any of the
probe machinery. `OperationsVTable` gains `type ProbeState`, the state an
encoding may keep across repeated reads, and `probe_scalar(state, index,
ctx)`, defaulting to `scalar_at` so no encoding changes behaviour.
`ProbeState<'_, V>` for now only carries the `ArrayView`; the erased
dispatch routes one-off reads through it. Every encoding declares
`type ProbeState = ()`.

`scalar_at` stays until encodings migrate to `probe_scalar`.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CqrLKgPqFYGZK5sjk1qe7
@joseph-isaacs joseph-isaacs added the changelog/feature A new feature label Sep 15, 2026
@joseph-isaacs

Copy link
Copy Markdown
Contributor Author

Folded into #9890 as its first commit.

@joseph-isaacs
joseph-isaacs deleted the ji/probe-vtable-hook branch September 15, 2026 17:54
@codspeed

codspeed Bot commented Sep 15, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 0.16%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 2 regressed benchmarks
✅ 2193 untouched benchmarks
⏩ 218 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation random_i8[0.5] 71.3 µs 94.7 µs -24.68%
Simulation decompress[u64, (4000, 1024)] 71.5 µs 86.9 µs -17.71%
Simulation random_i16[0.8] 96.4 µs 77.8 µs +23.93%
WallTime words_gather_scalar_avx2[65536] 9.4 µs 8.2 µs +13.82%
Simulation allocate_drop_arrow[0] 456.9 ns 402.7 ns +13.45%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ji/probe-vtable-hook (264e0d4) with develop (b5f43ba)

Open in CodSpeed

Footnotes

  1. 218 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant