Skip to content

Add compute benchmarks for Widen - #10888

Merged
connortsui20 merged 3 commits into
developfrom
ct/narrow-benchmarks
Oct 28, 2026
Merged

connortsui20 merged 3 commits into
developfrom
ct/narrow-benchmarks

Conversation

@connortsui20

@connortsui20 connortsui20 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

The next two PRs in this stack add aggregate, arithmetic and pushdown kernels for Widen. Their only purpose is speed, so CodSpeed needs a baseline before they land. This PR adds vortex-array/benches/widen.rs and no library code.

Based on #10864.

Changes

Each case runs one operation on three inputs that hold the same logical i64 values: widen is a Widen over i16 values, decoded is that Widen decoded inside the timed region, and canonical is the canonical i64 array. A kernel for Widen should move only the widen case, so decoded and canonical are controls. The operations are compare, between, filter, take (with fewer indices than values, and with many indices into few values, as a dictionary has), slice, sum, min_max, add (with a constant, a Widen and a canonical operand), cast to f64, fill null with a value outside the i16 range, zip, chunked canonicalization and interleave.

The CodSpeed benchmark IDs changed from narrow to widen, and the wide input label changed to canonical.

The inputs have 32,768 rows, so every case does a few µs of work above the CodSpeed harness floor (the fastest local median is about 2.4 µs) and the slowest stays under 30 µs. The widen target joins the "Array compute" CodSpeed shard, because its cases are compute.

@codspeed

codspeed Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 12.14%

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 3 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

❌ 1 regressed benchmark
✅ 2227 untouched benchmarks
🆕 46 new benchmarks
⏩ 366 skipped benchmarks1
🗄️ 73 archived benchmarks run2

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime threshold_avx2[80] 2.8 µs 3.1 µs -12.14%
🆕 CPU Simulation add_canonical[decoded] N/A 922.1 µs N/A
🆕 CPU Simulation add_canonical[widen] N/A 928.3 µs N/A
🆕 CPU Simulation add_constant[canonical] N/A 548.1 µs N/A
🆕 CPU Simulation add_constant[decoded] N/A 691.2 µs N/A
🆕 CPU Simulation add_constant[widen] N/A 694.9 µs N/A
🆕 CPU Simulation add_widen[canonical] N/A 779.6 µs N/A
🆕 CPU Simulation add_widen[decoded] N/A 1.1 ms N/A
🆕 CPU Simulation add_widen[widen] N/A 1.1 ms N/A
🆕 CPU Simulation between_in_range[canonical] N/A 311.3 µs N/A
🆕 CPU Simulation between_in_range[decoded] N/A 458.2 µs N/A
🆕 CPU Simulation between_in_range[widen] N/A 467 µs N/A
🆕 CPU Simulation cast_f64[canonical] N/A 568.9 µs N/A
🆕 CPU Simulation cast_f64[decoded] N/A 709.5 µs N/A
🆕 CPU Simulation cast_f64[widen] N/A 724.4 µs N/A
🆕 CPU Simulation chunked[canonical] N/A 1.4 ms N/A
🆕 CPU Simulation chunked[decoded] N/A 1.6 ms N/A
🆕 CPU Simulation chunked[widen] N/A 1.5 ms N/A
🆕 CPU Simulation compare_in_range[canonical] N/A 310 µs N/A
🆕 CPU Simulation compare_in_range[decoded] N/A 455 µs N/A
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

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


Comparing ct/narrow-benchmarks (1b094bd) with develop (6005d19)

Open in CodSpeed

Footnotes

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

  2. 73 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩

@connortsui20
connortsui20 marked this pull request as ready for review October 27, 2026 18:02
Comment thread vortex-array/benches/widen.rs Resolved

@robert3005 robert3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apart from the take benchmark name

@connortsui20
connortsui20 enabled stacked auto-merge (squash) October 28, 2026 14:43
@connortsui20 connortsui20 changed the title Add compute benchmarks for Narrow Add compute benchmarks for Widen Oct 28, 2026
@connortsui20
connortsui20 disabled stacked auto-merge October 28, 2026 16:16
Base automatically changed from ct/narrow-in-memory to develop October 28, 2026 16:17
Each case runs one operation on three inputs that hold the same logical
i64 values: a Widen over i16 values, the same Widen decoded inside the
timed region, and a canonical i64 array. A Widen kernel changes only the
widen case, so the other two are controls for the kernels in the next
PRs of the stack. The inputs have 32,768 rows, so every case does a few
microseconds of work above the CodSpeed harness floor.

Signed-off-by: Connor Tsui <[email protected]>
`take` and `dict_take` both execute a `Dict` over the values, because
`take` builds a lazy `Dict`. So they run the same take kernel and differ
only in the ratio of indices to values. Rename them to
`take_few_indices` and `take_many_indices`, call `take` in both, and
describe each case by its shape.

Signed-off-by: Connor Tsui <[email protected]>
@connortsui20
connortsui20 merged commit 2fb259b into develop Oct 28, 2026
84 of 85 checks passed
@connortsui20
connortsui20 deleted the ct/narrow-benchmarks branch October 28, 2026 16:42
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