feat(vortex-geo): ST_Distance via the geo crate + Polygon type#8497
feat(vortex-geo): ST_Distance via the geo crate + Polygon type#8497HarukiMoriarty wants to merge 2 commits into
geo crate + Polygon type#8497Conversation
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
a0dd7e7 to
ce8e596
Compare
Signed-off-by: Nemo Yu <zyu379@wisc.edu>
Merging this PR will improve performance by 22.57%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | take_10k_random |
197.7 µs | 253.7 µs | -22.08% |
| ❌ | Simulation | take_10k_contiguous |
217.6 µs | 274.4 µs | -20.68% |
| ❌ | Simulation | patched_take_10k_contiguous_patches |
232.1 µs | 288.8 µs | -19.64% |
| ❌ | Simulation | patched_take_10k_random |
244.5 µs | 301.2 µs | -18.83% |
| ❌ | Simulation | encode_varbin[(1000, 2)] |
239.6 µs | 294.6 µs | -18.67% |
| ❌ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
162.7 µs | 191.4 µs | -14.98% |
| ❌ | Simulation | varbinview_large |
112.6 µs | 130.8 µs | -13.93% |
| ❌ | Simulation | decompress_rd[f64, (100000, 0.01)] |
890.1 µs | 1,020.4 µs | -12.77% |
| ❌ | Simulation | decompress_rd[f64, (100000, 0.1)] |
890.2 µs | 1,020.4 µs | -12.76% |
| ❌ | Simulation | and_true_constant |
14.9 µs | 16.8 µs | -11.41% |
| ❌ | Simulation | or_false_constant |
14.9 µs | 16.8 µs | -11.23% |
| ❌ | Simulation | bench_many_codes_few_values[1024] |
467.5 µs | 526.3 µs | -11.17% |
| ⚡ | Simulation | search_index_mixed_out_of_range |
255.9 µs | 78.9 µs | ×3.2 |
| ⚡ | Simulation | search_index_above_max |
255.7 µs | 78.9 µs | ×3.2 |
| ⚡ | Simulation | search_index_below_min |
255.7 µs | 78.9 µs | ×3.2 |
| ⚡ | Simulation | search_index_full_range_random |
255.9 µs | 79 µs | ×3.2 |
| ⚡ | Simulation | search_index_in_range |
256.1 µs | 79.2 µs | ×3.2 |
| ⚡ | Simulation | chunked_dict_primitive_into_canonical[u32, (1000, 10, 10)] |
185.4 µs | 87.3 µs | ×2.1 |
| ⚡ | Simulation | chunked_bool_canonical_into[(10, 1000)] |
751.4 µs | 492.6 µs | +52.55% |
| ⚡ | Simulation | chunked_opt_bool_canonical_into[(10, 1000)] |
866.6 µs | 572.3 µs | +51.42% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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 vortex-geo-pr (242ee4c) with develop (aef6307)1
Summary
geo: unification, one distance (and remaining geo functions) implementation, replace the hand-roll kernel.polygon: as a second native type riding that same pathThe performance decreased (5.6ms -> 12ms on Q1) compared with the old direct-coordinate kernel, it is a tradeoff for one unified, general decode path. The cost is the intermediate allocation/enumeration, not the math itself. Type-specialized fast paths (e.g. point-point straight off the coordinate struct) can recover it later without changing the API.
Testing
4 distance behavior tests through geo crate, and tests for polygon type.