Repository navigation
Expose slots, dtype, len and is_empty on TypedArrayRef - #10406
Conversation
Extension traits over TypedArrayRef had to go through self.as_ref() to reach the backing ArrayRef for slots, dtype and length. Add these accessors to TypedArrayRef so the extension traits can call self.slots(), self.dtype() and self.len() directly. The accessors have default implementations through AsRef<ArrayRef>, so Array<V> and ArrayView<V> need no new code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Kruszewski <github@robertk.io>
Merging this PR will degrade performance by 23.78%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | density_sweep_dense_runs[0.001] |
30.2 µs | 48.1 µs | -37.24% |
| ❌ | Simulation | filter_powerlaw_by_mostly_true[250000] |
104 µs | 150.4 µs | -30.84% |
| ❌ | Simulation | take[routing/same_chunk/primitive/nonnull/chunks=32/indices=1000] |
176 µs | 222.5 µs | -20.86% |
| ❌ | Simulation | sum_i64 |
194.3 µs | 225.2 µs | -13.73% |
| ❌ | Simulation | sum_v2_i64 |
195.1 µs | 224.8 µs | -13.2% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing rk/typed-array-ref-accessors (7f86522) with develop (88a4de8)
Footnotes
-
534 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. ↩
Extension traits over TypedArrayRef had to go through self.as_ref() to
reach the backing ArrayRef for slots, dtype and length. Add these
accessors to TypedArrayRef so the extension traits can call
self.slots(), self.dtype() and self.len() directly.