Execute spatial distance with RowFn - #9349
Conversation
Merging this PR will degrade performance by 7.5%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | mul_i8_nonnull |
169.1 µs | 466.5 µs | -63.75% |
| ❌ | Simulation | mul_u8_nonnull |
163.4 µs | 416.6 µs | -60.77% |
| ❌ | Simulation | mul_u16_nonnull |
268.4 µs | 576.8 µs | -53.46% |
| ❌ | Simulation | mul_i32_nullable |
559.7 µs | 1,063.2 µs | -47.36% |
| ❌ | Simulation | add_i64_nullable |
965.7 µs | 1,756 µs | -45.01% |
| ❌ | Simulation | mul_i16_nonnull |
280.5 µs | 502.4 µs | -44.17% |
| ❌ | Simulation | mul_i32_constant |
363.8 µs | 649.6 µs | -44% |
| ❌ | Simulation | mul_u32_nonnull |
484.8 µs | 793.1 µs | -38.88% |
| ❌ | Simulation | case_when_nary_10_conditions[1000] |
396 µs | 603.7 µs | -34.41% |
| ❌ | Simulation | sub_i64_constant |
637.4 µs | 928.7 µs | -31.37% |
| ❌ | Simulation | add_i32_nonnull |
483 µs | 700.3 µs | -31.03% |
| ❌ | Simulation | add_i64_constant |
637.3 µs | 918.6 µs | -30.62% |
| ❌ | Simulation | mul_i32_nonnull |
507.9 µs | 701.7 µs | -27.62% |
| ❌ | Simulation | add_u32_nonnull |
483.5 µs | 666 µs | -27.39% |
| ❌ | Simulation | case_when_nary_equality_lookup[1000] |
310.6 µs | 422 µs | -26.4% |
| ❌ | Simulation | baseline_lt[4, 1024] |
95.8 µs | 129.6 µs | -26.08% |
| ❌ | Simulation | case_when_nary_10_conditions[10000] |
744 µs | 981.9 µs | -24.23% |
| ❌ | Simulation | baseline_eq[4, 1024] |
95.2 µs | 125.1 µs | -23.93% |
| ❌ | Simulation | case_when_nary_3_conditions[1000] |
227 µs | 296.6 µs | -23.48% |
| ❌ | Simulation | baseline_lt[16, 1024] |
97.3 µs | 127.1 µs | -23.43% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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-spatial-distance (8bad9d9) with ct/row-fn-tensor-products (91d89a1)
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. ↩
fadcf1d to
46c63e4
Compare
46c63e4 to
450326d
Compare
788ce5f to
bba41db
Compare
|
Here are the local spatial-distance 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 three ordinary distance cases remain within 2.65%. The nullable column-by-constant case improves by 13.85%. All spatial-distance results: 4 cases
|
bba41db to
1ef5b2a
Compare
1ef5b2a to
37eb0be
Compare
37eb0be to
949e266
Compare
949e266 to
268574a
Compare
e5fcac1 to
b297e14
Compare
b297e14 to
e62daf9
Compare
e62daf9 to
29bc76d
Compare
29bc76d to
0a1ca9b
Compare
2a2d8ae to
26bf6e2
Compare
26bf6e2 to
14ba47f
Compare
edfcdec to
cc8c276
Compare
cc8c276 to
f86a998
Compare
984cf3f to
f0a4635
Compare
f0a4635 to
68f1886
Compare
68f1886 to
21d882d
Compare
2f1d044 to
d241e54
Compare
d241e54 to
a3046ea
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
a3046ea to
8bad9d9
Compare
Rationale for this change
Moves spatial distance to the shared row executor. Each geometry column decodes once per batch, and a constant operand remains one decoded geometry.
What changes are included in this PR?
Adds the crate-private
GeometryRowinput element and expresses distance as a two-row kernel. Tests cover both constant positions, nullable inputs, mixed geometry types, and exact distance behavior.Rust 1.97.1 one-CGU fat-LTO measurements keep the ordinary distance cases within 2.7% of
develop; the nullable column-by-constant case improves by 13.9%.What APIs are changed? Are there any user-facing changes?
There are no public API or behavior changes.
SpatialDistanceimplementsRowFnand receives the standard scalar-function vtable automatically.