Use indexed sources for fallible constant rows - #9629
Conversation
Merging this PR will degrade performance by 39.38%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | subtract_shapes_avx2[(16384, PerRowConstant)] |
8.1 µs | 20.1 µs | -59.62% |
| ❌ | WallTime | subtract_shapes_avx2[(16384, ConstantPerRow)] |
8.2 µs | 20.1 µs | -59.48% |
| ❌ | WallTime | sub_i64_constant_avx2 |
8.2 µs | 20.1 µs | -59.39% |
| ❌ | WallTime | add_shapes_neon[(16384, PerRowConstant)] |
9.8 µs | 24.1 µs | -59.22% |
| ❌ | WallTime | add_i64_constant_neon |
9.8 µs | 24 µs | -59.08% |
| ❌ | WallTime | subtract_shapes_neon[(16384, PerRowConstant)] |
10 µs | 24.4 µs | -59.03% |
| ❌ | WallTime | sub_i64_constant_neon |
10.1 µs | 24.6 µs | -58.77% |
| ❌ | WallTime | add_shapes_neon[(16384, ConstantPerRow)] |
9.9 µs | 23.9 µs | -58.71% |
| ❌ | WallTime | subtract_shapes_neon[(16384, ConstantPerRow)] |
10.1 µs | 24.5 µs | -58.62% |
| ❌ | WallTime | mul_i32_constant_avx2 |
12 µs | 28.7 µs | -58.32% |
| ❌ | WallTime | subtract_shapes_avx2[(16384, PerRowNullableConstant)] |
8.7 µs | 20.7 µs | -58.14% |
| ❌ | WallTime | add_shapes_neon[(16384, PerRowNullableConstant)] |
10.3 µs | 24.3 µs | -57.55% |
| ❌ | WallTime | subtract_shapes_neon[(16384, PerRowNullableConstant)] |
10.7 µs | 25 µs | -57.21% |
| ❌ | WallTime | mul_i32_constant_neon |
11.5 µs | 27 µs | -57.19% |
| ❌ | WallTime | add_i64_constant_avx2 |
8.1 µs | 18.9 µs | -57.19% |
| ❌ | WallTime | add_shapes_avx2[(16384, PerRowConstant)] |
8.1 µs | 18.9 µs | -57.16% |
| ❌ | WallTime | add_shapes_avx2[(16384, ConstantPerRow)] |
8.1 µs | 18.9 µs | -57.1% |
| ❌ | WallTime | add_shapes_avx2[(16384, PerRowNullableConstant)] |
8.6 µs | 19.5 µs | -55.85% |
| ❌ | WallTime | scalar_subtract_neon |
14.2 µs | 21.1 µs | -32.59% |
| ❌ | WallTime | scalar_subtract_avx2 |
13.3 µs | 18.9 µs | -29.9% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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/row-fn-execute-owned-sources (95c4505) with ct/row-fn-constant-sources (d979a9b)
Footnotes
-
106 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. ↩
-
4 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. ↩
5b08a97 to
f640ec1
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
f640ec1 to
95c4505
Compare
Summary
Extends the decoded input source from #9628 to fallible
execute_ownedcalls.Fallible RowFns already collect into spare
Veccapacity while reducing compact failure evidence. Their constant fallback still selected between a row and a decoded constant throughElementTuple::getinside that loop, which hid the input layout from the optimizer and duplicated the traversal code used for ordinary row inputs.Changes
Constructs one decoded source for every all-valid batch, then passes it to the existing
map_checked_intocollector. The source fixes each argument's row-or-constant choice before traversal, while the output allocation, initialization rules, and deferred failure handling remain unchanged.This also removes the separate
LaneZipexecution branch. Optimized x86 IR keeps the same vector loop for varying Boolean inputs, unswitches source variants before the selected row loop, and removes the duplicate vectorized loop previously emitted for the two source representations. In the focused fixture, the deferred Boolean executor is 27% smaller and the deferredi64executor is 19% smaller, with the same bounds-panic sites.Tests cover a constant left-hand input. The focused benchmark covers varying inputs and both partial-constant orientations for deferred
i64output.