Skip to content

Harden indexed lane sources - #9358

Merged
connortsui20 merged 1 commit into
developfrom
ct/lane-kernel-sources
Aug 11, 2026
Merged

Harden indexed lane sources#9358
connortsui20 merged 1 commit into
developfrom
ct/lane-kernel-sources

Conversation

@connortsui20

@connortsui20 connortsui20 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Rationale for this change

Lets indexed lane sources return borrowed or otherwise non-Copy items. RowFn needs this for typed row inputs without adding a second kernel abstraction.

What changes are included in this PR?

Removes the Copy bound from IndexedSource::Item. It also makes LaneZip fields private, validates lengths once in LaneZip::new, and removes the repeated assertion from its inline len method.

This is a prerequisite only. The first production RowFn adopter is in #9345, so there is no meaningful RowFn performance comparison at this layer.

What APIs are changed? Are there any user-facing changes?

LaneZip must now be constructed with LaneZip::new instead of tuple syntax. The workspace has no direct field construction outside this module.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20

connortsui20 commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Another fun thing I found in my rustc investigation: when removing the Copy bound, sometimes the compiler can generate faster code because instead of a copy (load and store), it performs a move, which sometimes can allow a loop to vectorize better? Why? I have no idea! And when I tried to minimize for a repro I couldn't find a good one because things kept changing between rust versions.

Regardless, it seems like we should just take of the Copy constraint because it's not needed.

@codspeed-hq

codspeed-hq Bot commented Aug 11, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 1.6%

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 1960 untouched benchmarks
⏩ 89 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation cold_misaligned[(64, 256)] 4.4 ms 5 ms -12.5%
Simulation chunked_varbin_opt_to_varbinview_builder[(10, 100)] 630 µs 569.3 µ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 ct/lane-kernel-sources (ea0f552) with develop (402a5ac)

Open in CodSpeed

Footnotes

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

@connortsui20
connortsui20 merged commit ca7f626 into develop Aug 11, 2026
123 of 126 checks passed
@connortsui20
connortsui20 deleted the ct/lane-kernel-sources branch August 11, 2026 17:12
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