Skip to content

Expose slots, dtype, len and is_empty on TypedArrayRef - #10406

Merged
robert3005 merged 1 commit into
developfrom
rk/typed-array-ref-accessors
Oct 9, 2026
Merged

robert3005 merged 1 commit into
developfrom
rk/typed-array-ref-accessors

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

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.

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>
@codspeed

codspeed Bot commented Oct 9, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 23.78%

⚠️ 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

❌ 5 regressed benchmarks
✅ 2170 untouched benchmarks
⏩ 534 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

Footnotes

  1. 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. ↩

@joseph-isaacs joseph-isaacs added the changelog/chore A trivial change label Oct 9, 2026
@robert3005
robert3005 merged commit 85fd1ff into develop Oct 9, 2026
114 of 116 checks passed
@robert3005
robert3005 deleted the rk/typed-array-ref-accessors branch October 9, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants