feat(array): add probe_scalar to OperationsVTable with a ProbeState shell - #9892
joseph-isaacs wants to merge 1 commit into
Conversation
…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
|
Folded into #9890 as its first commit. |
Merging this PR will degrade performance by 0.16%
|
| 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)
Footnotes
-
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. ↩
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
OperationsVTablegainstype ProbeState: Default + 'static, the state an encoding may keep across repeated reads, andprobe_scalar(state: &mut ProbeState<'_, V>, index, ctx), defaulting toscalar_at. No encoding changes behaviour.ProbeState<'_, V>for now only carries theArrayView. The erased dispatch routes one-off reads through it.type ProbeState = ()(44 files, one line each).scalar_atstays until encodings migrate.Checks
cargo +nightly fmt --all -- --check: cleancargo clippy -p vortex-array --all-targets --all-features: cleancargo nextest run -p vortex-array --cargo-profile bench --no-fail-fast: passes apart from the twolistviewshould_panictests that cannot pass in the bench profile (pre-existing)vortex-array: passcargo build --workspace(excluding CUDA crates): passes🤖 Generated with Claude Code