Skip to content

Widen list take piece bounds to u64 before dispatch - #10738

Merged
connortsui20 merged 1 commit into
developfrom
rk/size-list-take-wide-pieces
Oct 26, 2026
Merged

connortsui20 merged 1 commit into
developfrom
rk/size-list-take-wide-pieces

Conversation

@robert3005

@robert3005 robert3005 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

The list take by PiecewiseSequence compiled its gather kernels for every combination of piece start, piece length, list offset and output offset type (4 x 4 x 4 x 4). The kernels read each piece start and length only once per piece. The inner loop over list offsets depends only on the offset types. The take now widens the starts and lengths to u64 and dispatches only on the offset types.

The widening does not copy when the pieces are already u64, which is the type that the list take itself produces. For other widths it copies the piece arrays once. That copy is proportional to the number of pieces, not to the number of elements.

before after
vortex-array release __text (macOS arm64) 14,012,988 B 12,798,204 B (-1.21 MB)

@robert3005 robert3005 added the changelog/chore A trivial change label Oct 23, 2026
@robert3005
robert3005 marked this pull request as draft October 23, 2026 16:57
@robert3005
robert3005 force-pushed the rk/size-list-take-wide-pieces branch from eb7a1f1 to 5d7e3b8 Compare October 23, 2026 17:01
@codspeed

codspeed Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 17.76%

4 warnings, 1 note

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

⚠️ Unable to measure the execution of 2 benchmarks

These benchmarks measured no execution time, so their results are not comparable and count as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

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

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

ℹ️ 40 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

⚡ 2 improved benchmarks
❌ 3 regressed benchmarks
✅ 2434 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation bench_compare_sliced_dict_primitive[(3333, 10000)] 32.9 µs 71.3 µs -53.81%
❌ CPU Simulation filter_powerlaw_by_random[250000] 131.3 µs 174.3 µs -24.65%
❌ CPU Simulation random_i8[0.01] 101.9 µs 115.5 µs -11.84%
⚡ Walltime threshold_avx512[80] 2.7 µs 2.5 µs +10.81%
⚡ CPU Simulation decompress[u16, (4000, 256)] 62.5 µs 56.5 µs +10.66%

Tip

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


Comparing rk/size-list-take-wide-pieces (699ffe0) with develop (76d8371)

Open in CodSpeed

Footnotes

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

@robert3005
robert3005 marked this pull request as ready for review October 25, 2026 16:57
@robert3005

Copy link
Copy Markdown
Contributor Author

This is really only a slow down if average list size is 1-4, otherwise it's noise

@connortsui20
connortsui20 enabled auto-merge (squash) October 26, 2026 16:09
@connortsui20
connortsui20 force-pushed the rk/size-list-take-wide-pieces branch from 5d7e3b8 to 2777b51 Compare October 26, 2026 16:09
The piecewise list take compiled its gather kernels for every
combination of piece start, piece length, list offset and output
offset type (4 x 4 x 4 x 4). The kernels read each piece start and
length only once per piece, so the take now widens them to u64 and
dispatches only on the offset types. The widening does not copy when
the pieces are already u64, which is the type that the list take
produces.

vortex-array release __text: 14,012,988 -> 12,798,204 bytes (-1.21 MB).

Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robert3005
robert3005 force-pushed the rk/size-list-take-wide-pieces branch from 2777b51 to 699ffe0 Compare October 26, 2026 16:20
@connortsui20
connortsui20 merged commit c9101d3 into develop Oct 26, 2026
79 of 81 checks passed
@connortsui20
connortsui20 deleted the rk/size-list-take-wide-pieces branch October 26, 2026 16:33
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