Execute primitive comparisons with RowFn - #9346
Conversation
Merging this PR will degrade performance by 28.98%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
04d477e to
2db7f1e
Compare
2db7f1e to
496e733
Compare
496e733 to
654caec
Compare
Use RowFn for primitive comparisons while retaining fused x86 bit-packing for the measured wide ordered cases where LLVM generates faster code. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Cover lane widths, equality, nullability, and both constant operand positions for primitive comparison dispatch. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
654caec to
213f008
Compare
|
Here are the local primitive-comparison 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 per-row All primitive-comparison results: 25 cases
|
Rationale for this change
Moves primitive comparisons to
RowFnwhere native measurements support it. The faster fused x86 path remains for selected 64-bit comparisons.RowFnover Vortex arrays #9130What changes are included in this PR?
The columnar path handles equality for
i64,u64, andf64, alli64andf64operators, and mixed-constantu64operators. Tests force both paths over identical values, validity, NaN, signed zero, and constant positions. Their encoding difference is intentional: columnar execution materializes aBoolArray, while row execution keeps a lazy mask chain.On Rust 1.97.1 with one CGU and fat LTO, per-row
u8andf32cases improve by 23.5% and 15.9%. Per-rowi32,f32equality, andu64regress by 22–26%. Mixed-constanti32andu8regress by 8.3–8.5x because LLVM 22 emits scalar loops for the RowFn path.What APIs are changed? Are there any user-facing changes?
There are no public API changes. The path selector and forced-path controls remain internal.