Skip to content

feat(vortex-bench): infra of SpatialBench on DuckDB #8543

Open
HarukiMoriarty wants to merge 2 commits into
developfrom
nemo/spatialbench-duckdb
Open

feat(vortex-bench): infra of SpatialBench on DuckDB #8543
HarukiMoriarty wants to merge 2 commits into
developfrom
nemo/spatialbench-duckdb

Conversation

@HarukiMoriarty

Copy link
Copy Markdown
Contributor

Summary

Adds a SpatialBench benchmark that runs on DuckDB across three storage lanes, Vortex native geometry, Vortex WKB, and GeoParquet. Spatial filters (ST_Distance, ST_Point, ST_X, ST_Y) lower into the Vortex scan and compute over columnar Point coordinates instead of materializing WKB each row.

Benchmark results

Local, warm, median of 5 (ms).

Q0 — radius filter (ST_Distance ≤ 50 km, ranked by distance)

Scale factor vortex-native vortex-WKB GeoParquet native vs WKB
SF1 6.4 15.5 41.4 2.4×
SF3 13.4 40.2 52.4 3.0×
SF10 32.8 129 189 3.9×

Q7 — building join (pickups within 500 m of each building)

Scale factor vortex-native vortex-WKB GeoParquet
SF1 89 77 200
SF3 295 256 284
SF10 1053 928 1114

Takeaways

  • Q0: native geometry pushdown wins decisively, the ST_Distance filter runs inside the scan over columnar f64 coordinates instead of materializing WKB per row.
  • Q7: lanes converge — this is an engine-side spatial join where DuckDB builds a on-the-fly in-memory R-tree on the build side at query time, so it's format-blind. The native lane even pays a small f64→WKB serialization cost to feed the join.

Signed-off-by: Nemo Yu <zyu379@wisc.edu>
@HarukiMoriarty HarukiMoriarty requested a review from a team June 22, 2026 17:39
@HarukiMoriarty HarukiMoriarty added the changelog/feature A new feature label Jun 22, 2026
@codspeed-hq

codspeed-hq Bot commented Jun 22, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 2 improved benchmarks
❌ 3 regressed benchmarks
✅ 1578 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_varbinview_canonical_into[(1000, 10)] 154.6 µs 190.9 µs -19.02%
Simulation bitwise_not_vortex_buffer_mut[128] 215.3 ns 244.4 ns -11.93%
Simulation rebuild_naive 99.8 µs 111 µs -10.09%
Simulation chunked_bool_canonical_into[(1000, 10)] 26.4 µs 16.1 µs +63.33%
Simulation chunked_varbinview_canonical_into[(100, 100)] 260.4 µs 223.7 µs +16.42%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing nemo/spatialbench-duckdb (4216cd0) with develop (e6d0e08)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant