Execute spatial distance with RowFn - #9349
Conversation
Merging this PR will improve performance by 13.52%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | nullable_point_column_x_constant_point |
754.7 µs | 657.9 µs | +14.72% |
| ⚡ | WallTime | words_gather_scalar[65536] |
9.4 µs | 8.3 µs | +13.89% |
| ⚡ | Simulation | compress_fsst[(500, 64, 8)] |
585.9 µs | 523.2 µs | +11.97% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ct/row-fn-spatial-distance (f77666b) with develop (46a8d39)2
Footnotes
-
442 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-filter-scatter(b6c09be) during the generation of this report, sodevelop(46a8d39) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
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
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
a3046ea to
8bad9d9
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
|
Im going to close this and let @HarukiMoriarty take over implementation, as we might want to switch to columnar execution |
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.