Execute primitive numeric operators with RowFn - #9345
Conversation
Merging this PR will degrade performance by 21.48%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | mul_i8_nonnull |
167.5 µs | 512.6 µs | -67.32% |
| ❌ | Simulation | mul_u8_nonnull |
162.1 µs | 485.2 µs | -66.6% |
| ❌ | Simulation | mul_u16_nonnull |
266.8 µs | 577 µs | -53.76% |
| ❌ | Simulation | mul_i16_nonnull |
278.8 µs | 571 µs | -51.18% |
| ❌ | Simulation | mul_i32_nullable |
557.9 µs | 1,062.5 µs | -47.49% |
| ❌ | Simulation | mul_i32_constant |
362.8 µs | 672.9 µs | -46.08% |
| ❌ | Simulation | add_i64_nullable |
963.8 µs | 1,755.2 µs | -45.09% |
| ❌ | Simulation | mul_u32_nonnull |
483 µs | 793.8 µs | -39.15% |
| ❌ | Simulation | add_i32_nonnull |
481.5 µs | 765.7 µs | -37.11% |
| ❌ | Simulation | mul_i32_nonnull |
506.6 µs | 770.2 µs | -34.23% |
| ❌ | Simulation | add_u32_nonnull |
481.9 µs | 731.6 µs | -34.14% |
| ❌ | Simulation | sub_i64_constant |
636.6 µs | 949 µs | -32.92% |
| ❌ | Simulation | add_i64_constant |
636.4 µs | 938.9 µs | -32.21% |
| ❌ | Simulation | list_length_large |
22.2 ms | 30.8 ms | -27.93% |
| ❌ | Simulation | list_length_medium |
339.1 µs | 441.1 µs | -23.13% |
| ❌ | Simulation | add_i64_nonnull |
912.4 µs | 1,168.6 µs | -21.92% |
| ❌ | Simulation | multipolygon_random_nulls |
749 µs | 907.2 µs | -17.44% |
| ❌ | Simulation | linestrings |
164.9 µs | 198.8 µs | -17.04% |
| ❌ | Simulation | points |
163.1 µs | 196.5 µs | -16.99% |
| ❌ | Simulation | two_vertex_lines |
280 µs | 336.9 µs | -16.88% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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-numeric-operators (dc599ad) with develop (54e01d4)2
Footnotes
-
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. ↩
-
No successful run was found on
ct/row-fn-batch(6e5d5f3) during the generation of this report, sodevelop(54e01d4) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
ab0697a to
b63ded4
Compare
## 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. - Progress towards: #9129 ## 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>
f8670a8 to
f108cdd
Compare
|
Here are the local arithmetic benchmark results from the final Rust 1.97.1 run. The comparison used a The machine was an AMD Ryzen 9 7950X running Linux. The build used rustc 1.97.1, LLVM 22.1.6, one CGU, fat LTO, and Negative changes are faster. The values are medians across the seven paired runs. The main results are:
A separate comparison covered the later naming and structural cleanup. All 24 RowFn matrix cases remained between 2.59% faster and 1.09% slower. RowFn arithmetic matrix: 24 cases
Existing arithmetic cases and controls: 28 cases
|
b2495de to
c1584a6
Compare
c1584a6 to
b722af5
Compare
b722af5 to
eea857d
Compare
0e8ab1d to
7693f90
Compare
1dd63b9 to
9be3db4
Compare
413796d to
00f78ed
Compare
00f78ed to
803154d
Compare
803154d to
c47f0b9
Compare
c47f0b9 to
a568375
Compare
0df353f to
2201917
Compare
2201917 to
0db5947
Compare
0db5947 to
73f1012
Compare
73f1012 to
0386a28
Compare
0386a28 to
cf5e273
Compare
cf5e273 to
71888e8
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Rationale for this change
Makes primitive arithmetic the first production user of
RowFn.Binarykeeps its registered identity and existing scalar-function hooks.RowFnAPI #9129RowFnover Vortex arrays #9130What changes are included in this PR?
Checked add, subtract, and multiply reduce compact failure evidence outside their vector loops. Integer division stops at the first failure and writes directly into uninitialized output. Decimal arithmetic remains on its existing columnar path.
With Rust 1.97.1 and LLVM 22.1.6, optimized IR and assembly confirm that mixed-constant add, subtract, and multiply vectorize under the 16-CGU, no-LTO benchmark profile. The earlier 4.6–7.5x mixed-constant regressions were measured before the output-iterator fix in #9353 and no longer describe this branch.
What APIs are changed? Are there any user-facing changes?
There are no public API changes. Primitive arithmetic delegates execution to the private
NumericBinaryrow kernel.