Execute primitive numeric operators with RowFn - #9345
Conversation
Merging this PR will degrade performance by 11.49%
|
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
a517965 to
2d2af5d
Compare
2d2af5d to
dfd648d
Compare
425e336 to
adcff3b
Compare
adcff3b to
b7eb750
Compare
b7eb750 to
8003cbb
Compare
8003cbb to
d0f1b2d
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
d0f1b2d to
413796d
Compare
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.