Execute spatial predicates with RowFn - #9350
Conversation
Merging this PR will regress 1 benchmark
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | words_gather_scalar[65536] |
8.3 µs | 9.4 µs | -11.75% |
| ⚡ | Simulation | nullable_points_x_constant |
1,402.2 µs | 717.2 µs | +95.5% |
| ⚡ | Simulation | constant_x_nullable_points |
1,402.9 µs | 720.7 µs | +94.67% |
| ⚡ | Simulation | constant_x_nullable_polygons_disjoint |
1,531.9 µs | 793.7 µs | +93.02% |
| ⚡ | Simulation | points_x_constant |
1,278.8 µs | 664.4 µs | +92.48% |
| ⚡ | Simulation | polygons_overlapping_x_constant |
1,300.3 µs | 677.5 µs | +91.93% |
| ⚡ | Simulation | constant_x_points |
1,278.9 µs | 668.4 µs | +91.34% |
| ⚡ | Simulation | nullable_polygons_disjoint_x_constant |
1,539 µs | 809.8 µs | +90.05% |
| ⚡ | Simulation | polygons_disjoint_x_constant |
1,291.7 µs | 680.8 µs | +89.74% |
| ⚡ | Simulation | constant_x_polygons_disjoint |
1,295.3 µs | 683.4 µs | +89.55% |
| ⚡ | Simulation | nullable_polygons_x_nullable_points |
597.3 µs | 416.1 µs | +43.54% |
| ⚡ | Simulation | nullable_polygons_90pct_x_constant_point |
528.6 µs | 405.9 µs | +30.22% |
| ⚡ | Simulation | column_x_column_polygons |
321.6 µs | 269.7 µs | +19.25% |
| ⚡ | Simulation | column_x_column_polygons |
324 µs | 275.6 µs | +17.58% |
| ⚡ | Simulation | column_x_column_points |
281.8 µs | 251.3 µs | +12.12% |
| 🆕 | Simulation | constant_x_polygons_overlapping |
N/A | 841.8 µs | N/A |
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-predicates (a37c59f) with ct/row-fn-spatial-distance (f77666b)
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. ↩
a7a83b0 to
8ca9fc7
Compare
8ca9fc7 to
970bec2
Compare
970bec2 to
5e69f45
Compare
5e69f45 to
a7f8ee0
Compare
|
Here are the local spatial-predicate benchmark results from the final Rust 1.97.1 run. The comparison used a Each target used two warm runs and seven alternating measured pairs. Each process used 100 samples with a 0.25–0.5 second measurement window on CPU 4. Negative changes are faster. The change is the median paired ratio, not the ratio of the two displayed medians. Most predicate cases remain within 8%. Two constant-left Contains and intersects: 15 cases
Envelope controls: 7 cases
Bounding-box controls: 8 cases
|
a7f8ee0 to
8afa323
Compare
8afa323 to
808b070
Compare
808b070 to
545ab01
Compare
545ab01 to
1997eff
Compare
1997eff to
f095e4a
Compare
f095e4a to
65d8de6
Compare
65d8de6 to
319b6af
Compare
319b6af to
27eca54
Compare
b37103b to
f83c857
Compare
f83c857 to
20fac56
Compare
5c37f58 to
a9b804e
Compare
c8bbf70 to
a0320fc
Compare
a0320fc to
b27f91e
Compare
8e447fc to
bed996c
Compare
bed996c to
ef12211
Compare
ef12211 to
fb9e412
Compare
fb9e412 to
94180e3
Compare
94180e3 to
e0e3fe7
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Rationale for this change
Moves
containsandintersectsto prepared row execution. This lets each batch reuse work derived from constant geometries.What changes are included in this PR?
containscaches constant bounding boxes and creates a prepared geometry only when a relate path needs it.intersectshoists constant bounding boxes for conservative rejection. Tests cover operand order, constants, nulls, NaN coordinates, bounding boxes, and exact predicate agreement.Rust 1.97.1 one-CGU fat-LTO results are mixed: most predicate cases remain within 8%, two constant-left
containscases regress by 16%, and sparse-null cases improve by 14–20%. The unchanged bounding-box controls remain near parity.What APIs are changed? Are there any user-facing changes?
There are no public API changes. The predicates keep their existing OGC behavior and lazy scalar-function interfaces.