Execute primitive comparisons with RowFn - #9346
Conversation
Merging this PR will degrade performance by 13.54%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | case_when_nary_10_conditions[1000] |
402.8 µs | 607.6 µs | -33.71% |
| ❌ | Simulation | case_when_nary_equality_lookup[1000] |
306.5 µs | 422.3 µs | -27.42% |
| ❌ | Simulation | baseline_lt[4, 1024] |
96.9 µs | 130.1 µs | -25.5% |
| ❌ | Simulation | case_when_nary_early_dominant[1000] |
222.8 µs | 296.2 µs | -24.77% |
| ❌ | Simulation | case_when_nary_10_conditions[10000] |
742.1 µs | 984.9 µs | -24.65% |
| ❌ | Simulation | baseline_eq[4, 1024] |
96.3 µs | 126.3 µs | -23.75% |
| ❌ | Simulation | case_when_nary_3_conditions[1000] |
225.8 µs | 295.5 µs | -23.58% |
| ❌ | Simulation | baseline_eq[16, 1024] |
98 µs | 127.8 µs | -23.32% |
| ❌ | Simulation | baseline_lt[16, 1024] |
98.1 µs | 127.3 µs | -22.93% |
| ❌ | Simulation | decompress[u64, (10000, 4)] |
309 µs | 400 µs | -22.74% |
| ❌ | Simulation | case_when_all_false[1000] |
120 µs | 151.6 µs | -20.85% |
| ❌ | Simulation | case_when_nary_equality_lookup[10000] |
513.7 µs | 647.8 µs | -20.7% |
| ❌ | Simulation | case_when_all_true[1000] |
124 µs | 156.4 µs | -20.69% |
| ❌ | Simulation | bench_compare_sliced_dict_primitive[(1000, 10000)] |
127.7 µs | 159.5 µs | -19.97% |
| ❌ | Simulation | bench_compare_sliced_dict_primitive[(2000, 10000)] |
141.4 µs | 174.8 µs | -19.15% |
| ❌ | Simulation | bench_compare_sliced_dict_primitive[(2500, 10000)] |
148 µs | 182.9 µs | -19.09% |
| ❌ | Simulation | bench_compare_sliced_dict_primitive[(3333, 10000)] |
161.9 µs | 196.6 µs | -17.65% |
| ❌ | Simulation | case_when_nary_early_dominant[10000] |
382.2 µs | 463.2 µs | -17.48% |
| ❌ | Simulation | case_when_nary_3_conditions[10000] |
384.1 µs | 465.2 µs | -17.44% |
| ❌ | Simulation | case_when_without_else[1000] |
161.1 µs | 194.6 µs | -17.21% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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-primitive-comparisons (a7ac7b1) with ct/row-fn-numeric-operators (d0f1b2d)
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. ↩
04d477e to
2db7f1e
Compare
2db7f1e to
496e733
Compare
496e733 to
654caec
Compare
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
|
d3c95a3 to
b1ea2ec
Compare
b1ea2ec to
e4c90c8
Compare
50f20d9 to
63fe058
Compare
a8788e7 to
83599c0
Compare
83599c0 to
9de6e71
Compare
1f269ba to
5230565
Compare
ad3f352 to
ea1293b
Compare
ea1293b to
b80087b
Compare
b80087b to
8c215b8
Compare
8c215b8 to
5adad6b
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
5adad6b to
a7ac7b1
Compare
Rationale for this change
Moves primitive comparisons to
RowFnwhere native measurements support it. The faster fused x86 path remains for selected 64-bit comparisons.RowFnAPI #9129RowFnover 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.With Rust 1.97.1 and LLVM 22.1.6, optimized IR and assembly confirm that mixed-constant primitive comparisons vectorize under the 16-CGU, no-LTO benchmark profile. The earlier 8.3–8.5x mixed-constant regressions were measured before the output-iterator fix in #9353 and no longer describe this branch. The fused comparison and bit-packing path remains about 38% faster for
compare_u64_constant.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.